<template>
  <div style="height:100%;width:100%;position:relative;">
      <div class="pagetop">
          <div style="width:100%;">
              <el-col>
                  <div ref="buttondiv">
                      <vxe-toolbar>
                          <template v-slot:buttons>
                              <table>
                                  <tr>
                                      <td>项目类型</td>
                                      <td>
                                          <el-select @change="germflagChange" v-model="seach_germflag" placeholder="请选择" style="width:200px">
                                              <el-option key="1" label="培养阴性结果" value="1"></el-option>
                                              <el-option key="5" label="培养阴性过程" value="5"></el-option>
                                              <el-option key="2" label="致病菌" value="2"></el-option>
                                              <el-option key="3" label="正常菌种" value="3"></el-option>
                                              <el-option key="4" label="涂片结果" value="4"></el-option>
                                          </el-select>
                                      </td>
                                      <td>Gram(一级分类)</td>
                                      <td>
                                          <el-select v-model="search_gram" style="width:200px;" clearable>
                                              <el-option v-for="(item,index) in $opt.gramOption" :key="index" :value="item.value" :label="item.label"></el-option>
                                          </el-select>
                                      </td>

                                      <td>菌属(三级分类)</td>
                                      <td>
                                          <rm-ddl-common datatype="germgroup" dataname="菌属(三级分类)" v-model="seach_germgroup" width="180px" :appendtobody="true" key="dialoggroupitemcode" readonly></rm-ddl-common>
                                      </td>
                                      <td :width="buttonwidth"></td>
                                      <td style="align:right">
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>快速查找</td>
                                      <td>
                                          <el-input placeholder="项目代码|名称|缩写|拼音码|外部代码" size="small" style="max-width:210px;" v-model="seach_keystr" @keyup.enter.native="MainTable_Rfresh()" clearable>
                                          </el-input>
                                      </td>
                                      <td>菌科(二级分类)</td>
                                      <td>
                                          <rm-ddl-common datatype="labgermkind" dataname="菌科(二级分类)" v-model="seach_germkind" width="200px" :appendtobody="true" key="dialoggermkind"></rm-ddl-common>
                                      </td>
                                      <td colspan="2">
                                          <el-radio-group v-model="chk_isgermgroup">
                                              <el-radio :label="0" selected @change="MainTable_Rfresh()" size="mini">全部</el-radio>
                                              <el-radio :label="1" @change="MainTable_Rfresh()" size="mini">细菌</el-radio>
                                              <el-radio :label="2" @change="MainTable_Rfresh()" size="mini">菌属</el-radio>
                                          </el-radio-group>
                                      </td>
                                      <td :width="buttonwidth"></td>
                                      <td style="align:right">
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="10">
                                          <el-button @click="MainTable_Rfresh()" icon="el-icon-search" v-has="'PINQUERY'" type="primary">查询</el-button>
                                          <!-- <el-divider direction="vertical"></el-divider> -->
                                          <!-- 基本信息 -->
                                          <el-button @click="tab_jbxx_addEvent" icon="el-icon-plus" v-bind:style="{ display: tab_jbxx_button}" v-has="'PADD'">新增</el-button>
                                          <el-button icon="el-icon-edit" @click="tab_jbxx_editEvent" v-bind:style="{ display: tab_jbxx_button}" v-has="'PMODIFY'">修改</el-button>
                                          <el-button @click="tab_jbxx_delete" icon="el-icon-delete" v-bind:style="{ display: tab_jbxx_button}" v-has="'PDELETE'">删除</el-button>
                                          <el-button @click="ExportEventDiv=true" icon="el-icon-download" v-bind:style="{ display: tab_jbxx_button}">导出</el-button>
                                          <el-button @click="importRptitem" icon="el-icon-upload2" v-bind:style="{ display: tab_jbxx_button}">导入</el-button>
                                          <div class="upload-button">
                                              <el-upload ref="upload" :action="url" accept=".xlsx" :on-change="fileChange" :show-file-list="showFile" :data="updata" :http-request="uploadOpt">
                                                  <el-button size="small" plain>选择文件</el-button>
                                                  <!-- <div slot="tip" class="el-upload__tip">只能上传DAT(*dat)文件，且不超过10M</div> -->
                                              </el-upload>
                                          </div>
                                          <!-- 文字结果 -->
                                          <el-button @click="tab_wzjg_addEvent('','M');" icon="el-icon-plus" v-bind:style="{ display: tab_wzjg_button}">新增</el-button>
                                          <el-button @click="tab_wzjg_delete" icon="el-icon-delete" v-bind:style="{ display: tab_wzjg_button}">删除</el-button>
                                          <el-button @click="tab_wzjg_addPN" icon="el-icon-c-scale-to-original" v-bind:style="{ display: tab_wzjg_button}">阴阳性</el-button>
                                          <el-button @click="tab_wzjg_save" icon="el-icon-document" v-bind:style="{ display: tab_wzjg_button}">保存</el-button>
                                          <el-button @click="tab_wzjg_export" v-bind:style="{ display: tab_wzjg_button}" icon="el-icon-download">导出</el-button>
                                          <el-button size="small" icon="el-icon-upload2" @click="tab_wzjg_import" v-bind:style="{ display: tab_wzjg_button}">导入</el-button>
                                          <!-- 临床意义 -->
                                          <el-button @click="tab_lcyy_save" icon="el-icon-document" v-bind:style="{ display: tab_lcyy_button}">保存</el-button>
                                      </td>
                                  </tr>
                              </table>
                          </template>
                      </vxe-toolbar>
                  </div>
              </el-col>
          </div>
      </div>
      <div class="pagecenter">
          <rm-layout-right splitcolor="white" movingcolor="#00ffff" :splitwidth=5 :fixsize=570>
              <template v-slot:fix>
                  <el-tabs style="height:100%;" type="border-card" @tab-click="tab_getdata" v-model="tab_showflag">
                      <el-tab-pane label="基本信息" style="overflow:scroll;" name="tabname_jbxx">
                          <el-form :inline="true" @submit.native.prevent label-width="auto" ref="form" :model="Tab_jbxx_Data">
                              <table>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">项目归类</font>
                                      </td>
                                      <td colspan="3">
                                          <el-input v-model="Tab_jbxx_Data.itemclassname" :readonly="true"></el-input>
                                      </td>
                                      <td>仪器大类</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="seccode" kindno="INSTRCLASS" v-model="Tab_jbxx_Data.instrclass" width="280px" :onlyshow="true"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">英文缩写</font>
                                      </td>
                                      <td>
                                          <el-input style="width:100px;" v-model="Tab_jbxx_Data.itemcode_en" :readonly="true"></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">项目代码</font>
                                      </td>
                                      <td>
                                          <el-input style="width:96px" v-model="Tab_jbxx_Data.rpt_itemcode" :readonly="true"></el-input>
                                      </td>
                                      <td>允许CV(%)</td>
                                      <td>
                                          <el-input style="width:100px;" v-model="Tab_jbxx_Data.qccv" :readonly="true"></el-input>
                                      </td>
                                      <td>允许TEa(%)</td>
                                      <td>
                                          <el-input style="width:105px;" v-model="Tab_jbxx_Data.qctea" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">中文名称</font>
                                      </td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.rpt_itemname" :readonly="true"></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">报告代码</font>
                                      </td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.rptcode" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>项目备注</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.itemtips" :readonly="true"></el-input>
                                      </td>
                                      <td>统计代码</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.statcode" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>英文名称</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.itemname_en" :readonly="true"></el-input>
                                      </td>
                                      <td>频次</td>
                                      <td colspan="3">
                                          <el-input style="width:80px" v-model="Tab_jbxx_Data.seq" :readonly="true"></el-input>&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.nostat" :disabled="true">不参与统计</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data.stopflag" :disabled="true">停用</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">结果类型</font>
                                      </td>
                                      <td>
                                          <el-input v-model="Tab_jbxx_Data.resulttype_name" style="width:100px" readonly></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">小数位数</font>
                                      </td>
                                      <td>
                                          <el-input v-model="Tab_jbxx_Data.dec_digits_name" style="width:96px" readonly></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">项目类型</font>
                                      </td>
                                      <td colspan="2">
                                          <el-input v-model="Tab_jbxx_Data.germflag_name" style="width:150px" readonly></el-input>
                                      </td>
                                      <td align="left">
                                          <el-checkbox v-model="Tab_jbxx_Data.resulttwice" :disabled="true">结果需复核</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>单位</td>
                                      <td>
                                          <el-input style="width:100px" v-model="Tab_jbxx_Data.unit" :readonly="true"></el-input>
                                      </td>
                                      <td>价格</td>
                                      <td>
                                          <el-input style="width:96px" v-model="Tab_jbxx_Data.price" :readonly="true"></el-input>
                                      </td>
                                      <td>申请项目</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="reqitem" v-model="Tab_jbxx_Data.req_itemcode" width="280px" :onlyshow="true"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>测试方法</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.testmethod" :readonly="true"></el-input>
                                      </td>
                                      <td>急诊申请项目</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="reqitem" v-model="Tab_jbxx_Data.req_itemcode_stat" width="280px" :onlyshow="true"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>输入码</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.inputcode" :readonly="true"></el-input>
                                      </td>
                                      <td>Gram(一级分类)</td>
                                      <td colspan="2">
                                          <el-input v-model="Tab_jbxx_Data.germgram" style="width:150px;" readonly></el-input>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data.isgermgroup" disabled="">菌属标志</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>默认取值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.defaultval" :readonly="true"></el-input>
                                      </td>
                                      <td>菌科(二级分类)</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labgermkind" dataname="菌科(二级分类)" v-model="Tab_jbxx_Data.germkind" width="280px" :onlyshow="true" key="germkind"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果1默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.defaultresult1" :readonly="true"></el-input>
                                      </td>
                                      <td>菌属(三级分类)</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="germgroup" dataname="菌属(三级分类)" key="groupitemcode" v-model="Tab_jbxx_Data.groupitemcode" width="280px" :onlyshow="true"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果2默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.defaultresult2" :readonly="true"></el-input>
                                      </td>
                                      <td>默认药敏组合</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labmedgroup" dataname="药敏组合" v-model="Tab_jbxx_Data.germmedgroup" width="280px" :onlyshow="true" key="germmedgroup"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果3默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.defaultresult3" :readonly="true"></el-input>
                                      </td>
                                      <td>基因输入模板</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labgeneinputmdl" dataname="基因输入模板" key="geneinputmdlid" v-model="Tab_jbxx_Data.geneinputmdlid" width="280px" :onlyshow="true"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">默认文字结果标志</font>
                                      </td>
                                      <td>
                                          <el-input v-model="Tab_jbxx_Data.textresultflag_name" readonly></el-input>
                                      </td>
                                      <td>样本质量</td>
                                      <td>
                                          <el-input v-model="Tab_jbxx_Data.samplequalityname" readonly></el-input>
                                      </td>
                                      <td>计算用默认取值</td>
                                      <td colspan="3">
                                          <el-input style="width:120px" v-model="Tab_jbxx_Data.defcalcvalue" :readonly="true"></el-input>
                                          WhoNet代码<el-input style="width:87px;" v-model="Tab_jbxx_Data.germwhocode" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">参考/复查值范围</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.ref_bysex" :disabled="true">参考范围性别有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data.ref_byage" :disabled="true">参考范围年龄有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data.ref_byspecimen" :disabled="true">参考范围标本有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data.ref_byphysicycle" true-label="1" false-label="0" :disabled="true">参考范围生理周期有关</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.ref_bydiag" true-label="1" false-label="0" :disabled="true">参考范围诊断相关</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>参考值低值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.ref_l" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td>参考值高值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.ref_h" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td>参考值显示</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.ref_text" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>需复查低值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.redo_l" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td>需复查高值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.redo_h" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td colspan="4">

                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          病人复查前后结果比较超出<el-input style="width:60px" v-model="Tab_jbxx_Data.redo_ratio" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>%
                                          且数值差超出<el-input style="width:60px" v-model="Tab_jbxx_Data.redo_abs" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>审核前提醒
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">审核相关</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.autochkflag" :disabled="true">允许自动审核</el-checkbox>
                                      </td>
                                      <td colspan="4">
                                          <el-checkbox v-model="Tab_jbxx_Data.sameflagautochkok" :disabled="true">结果标志和上次相同即自动审核通过</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.autochk_txtresult" :disabled="true">未列文字结果不可自动审核</el-checkbox>
                                      </td>
                                      <td colspan="4">
                                          <el-checkbox v-model="Tab_jbxx_Data.autochk_qtlt" :disabled="true">包含&lt;&gt;也按数值判断自动审核</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="padding-left:33px">自动审核低值</td>
                                      <td style="padding-left:7px">
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.autochk_l" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td>自动审核高值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.autochk_h" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                      <td colspan="4">
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;padding-left:33px">
                                          病人两次结果在<el-input style="width:95px" v-model="Tab_jbxx_Data.chklastdays" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>&nbsp;天内比较超出&nbsp;
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data.chklastratio" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>%且数值差超出&nbsp;<el-input style="width:95px" v-model="Tab_jbxx_Data.chklastabs" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>审核前提醒
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data.mustmatchlastflag" :disabled="true">结果标志和上次不同警告</el-checkbox>
                                      </td>
                                      <td colspan="4">
                                          <el-checkbox v-model="Tab_jbxx_Data.mustmatchlast" :disabled="true">结果和上次不同警告</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">危急值</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>与上次比较危急值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data.limit_rule" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>危急值分类</td>
                                      <td>
                                          <el-input style="width:50px" v-model="Tab_jbxx_Data.alertkind" :readonly="true"></el-input>类
                                      </td>
                                      <td colspan="2">
                                          <el-checkbox v-model="Tab_jbxx_Data.autoalert" :disabled="true">危急值自动上报</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;padding-left:35px">
                                          病人危急值在&nbsp;<el-input style="width:95px" v-model="Tab_jbxx_Data.alertouthours" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                          小时内重复出现不再上报(0或空=总是上报，-1=本次住院)
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">计算公式</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>计算公式</td>
                                      <td colspan="7">
                                          <el-input style="width:620px" readonly v-model="Tab_jbxx_Data.calc_formula"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>计算公式显示</td>
                                      <td colspan="7">
                                          <el-input style="width:620px" readonly v-model="Tab_jbxx_Data.calc_formulatext"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果1计算公式</td>
                                      <td colspan="7">
                                          <el-input style="width:620px" readonly v-model="Tab_jbxx_Data.result1formula"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果2计算公式</td>
                                      <td colspan="7">
                                          <el-input style="width:620px" readonly v-model="Tab_jbxx_Data.result2formula"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果3计算公式</td>
                                      <td colspan="7">
                                          <el-input style="width:620px" readonly v-model="Tab_jbxx_Data.result3formula"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">外部代码及其它</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>{{externalcode1alias}}</td>
                                      <td colspan="3">
                                          <el-input v-model="Tab_jbxx_Data.externalcode1_name" readonly></el-input><!-- @dblclick.native="jbxx_open_externalcodeDialog('e1')" --->
                                      </td>
                                      <td>{{externalcode4alias}}</td>
                                      <td colspan="3">
                                          <el-input style="width:240px" v-model="Tab_jbxx_Data.externalcode4_name" readonly></el-input>
                                          <!--@dblclick.native="jbxx_open_externalcodeDialog('e4')"-->
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>{{externalcode2alias}}</td>
                                      <td colspan="3">
                                          <el-input v-model="Tab_jbxx_Data.externalcode2_name" readonly></el-input>
                                          <!--@dblclick.native="jbxx_open_externalcodeDialog('e2')"--->
                                      </td>
                                      <td>{{externalcode5alias}}</td>
                                      <td colspan="3">
                                          <el-input style="width:240px" v-model="Tab_jbxx_Data.externalcode5_name" readonly></el-input>
                                          <!--@dblclick.native="jbxx_open_externalcodeDialog('e5')"--->
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>{{externalcode3alias}}</td>
                                      <td colspan="3">
                                          <el-input v-model="Tab_jbxx_Data.externalcode3_name" readonly></el-input>
                                      </td>
                                      <!--@dblclick.native="jbxx_open_externalcodeDialog('e3')"-->
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;padding-left:20px">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          建议：外部代码1 用作HIS系统对照，代码2 用作体检系统对照，代码3 用作rmlis4的对照
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>基准代码</td>
                                      <td colspan="8">
                                          <el-input style="width:620px" v-model="Tab_jbxx_Data.basecode" readonly></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;padding-left:59px">
                                          结果超出&nbsp;<el-input style="width:95px" v-model="Tab_jbxx_Data.dilutionlimit" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                          需稀释后测试，默认稀释倍数<el-input style="width:95px" v-model="Tab_jbxx_Data.dilutionrate" oninput="value=value.replace(/[^\-?\d.]/g,'')" :readonly="true"></el-input>
                                      </td>
                                  </tr>
                              </table>
                          </el-form>
                      </el-tab-pane>
                      <el-tab-pane label="文字结果" name="tabname_wzjg">
                          <vxe-table :data.sync="tab_wzjg_data" :loading="tab_wzjg_loading" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" border height="auto" highlight-current-row highlight-hover-column highlight-hover-row ref="tab_wzjg_Table" show-overflow size="mini" :row-class-name="wzjgRowClassName" show-header-overflow :optimization="{animat: false}" resizable :edit-config="{trigger: 'click', mode: 'cell',showStatus:true,showIcon:false}" :edit-rules="tab_wzjg_validRules" :key="reskey" header-align="center" class="wzjgstyle">
                              <vxe-table-column type="selection" width="40" align="center"></vxe-table-column>
                              <!-- <vxe-table-column key="rpt_itemcode" field="rpt_itemcode" title="项目代码" width="90px"></vxe-table-column> -->
                              <vxe-table-column key="textvalue" field="textvalue" title="文字结果" :edit-render="{name: 'input',autoselect:true}" width="150px">
                              </vxe-table-column>
                              <vxe-table-column key="result_flag" field="result_flag" title="结果标志" :edit-render="{name: 'select',options:result_flagOption}" width="80px">
                              </vxe-table-column>
                              <vxe-table-column key="canautochk" field="canautochk" title="自动审核" width="70px" align="center">
                                  <template v-slot="{ row }">
                                      <el-checkbox v-model="row.canautochk" true-label="1" false-label="0"></el-checkbox>
                                  </template>
                              </vxe-table-column>
                              <vxe-table-column key="redoflag" field="redoflag" title="需复查标志" width="70px" align="center">
                                  <template v-slot="{ row }">
                                      <el-checkbox v-model="row.redoflag" true-label="1" false-label="0"></el-checkbox>
                                  </template>
                              </vxe-table-column>
                              <vxe-table-column key="inputcode" field="inputcode" title="快速输入码" :edit-render="{name: 'input',autoselect:true}" width="80px"></vxe-table-column>
                              <vxe-table-column key="seq" field="seq" title="序号" width="50px" :edit-render="{name: 'input',autoselect:true}"></vxe-table-column>
                              <vxe-table-column key="resultkind" field="resultkind" title="类别" :edit-render="{name: 'select',options:resultkindOption}" width="70px">
                              </vxe-table-column>
                              <vxe-table-column key="containtext" field="containtext" title="包含此文字即可" width="110px" align="center">
                                  <template v-slot="{ row }">
                                      <el-checkbox v-model="row.containtext" true-label="1" false-label="0"></el-checkbox>
                                  </template>
                              </vxe-table-column>
                          </vxe-table>
                      </el-tab-pane>
                      <el-tab-pane label="临床意义" name="tabname_lcyy">
                          <el-input type="textarea" style="width:100%;margin-top:1px;margin-bottom:1px;" height="auto" placeholder="请输入内容" v-model="Tab_jbxx_Data.clinicsign" :autosize="{ minRows: 20, maxRows: 99}">
                          </el-input>
                      </el-tab-pane>
                  </el-tabs>
              </template>
              <div style="height:100%;width:100%;background-color:#ddccbb;">
                  <vxe-table :data.sync="MainTableData" :loading="MainLoading" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" border height="auto" highlight-current-row highlight-hover-column header-align="center" highlight-hover-row ref="Main_Table" resizable show-overflow size="mini" stripe class="mystyle" @current-change="MainTableChange_Event" :row-class-name="GetRowClassName" show-header-overflow>
                      <vxe-table-column field="itemclassname" sortable title="项目归类" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemcode_en" sortable title="英文缩写" width="58" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemname" sortable title="报告项目名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemcode" sortable title="报告项目代码" width="90" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_text" sortable title="参考值显示" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="unit" sortable title="单位" width="50" show-overflow></vxe-table-column>
                      <vxe-table-column field="rptcode" sortable title="报告单代码" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="iscalc" sortable title="计算项目" width="70" show-overflow align="center">
                          <template v-slot="{ row}">
                              <el-checkbox v-model="row.iscalc" disabled true-label="1" false-label="0"></el-checkbox>
                          </template>
                      </vxe-table-column>
                      <vxe-table-column field="calc_formulatext" sortable title="计算公式显示" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="resulttype_name" sortable title="结果类型" width="78" show-overflow></vxe-table-column>
                      <vxe-table-column field="dec_digits_name" sortable title="小数位数" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="instrclass" sortable title="仪器大类" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="germflag_name" sortable title="项目类型" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="mutex_no" sortable title="互斥项目数" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="transpecimen_no" sortable title="样本转换数" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemname_en" sortable title="英文名称" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="textresultflag_name" sortable title="默认文字结果标志" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_bysex" sortable title="参考值与性别有关" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_byage" sortable title="参考值与年龄有关" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_byspecimen" sortable title="参考值与标本有关" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_l" sortable title="参考低值" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_h" sortable title="参考高值" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="redo_l" sortable title="需复查低值" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="redo_h" sortable title="需复查高值" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="autoalert" sortable title="危急值自动上报" width="110" show-overflow align="center">
                          <template v-slot="{ row, rowIndex, columnIndex }">
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-if="row.autoalert == '1'">
                                  <el-checkbox checked disabled></el-checkbox>
                              </div>
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-else>
                                  <el-checkbox disabled></el-checkbox>
                              </div>
                          </template>
                      </vxe-table-column>
                      <vxe-table-column field="price" sortable title="价格" width="50" show-overflow></vxe-table-column>
                      <vxe-table-column field="inputcode" sortable title="输入码" width="60" show-overflow></vxe-table-column>
                      <vxe-table-column field="externalcode1_name" sortable sort-width="20" :title="externalcode1alias" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="externalcode2_name" sortable sort-width="20" :title="externalcode2alias" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="externalcode3_name" sortable sort-width="20" :title="externalcode3alias" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="externalcode4_name" sortable sort-width="20" :title="externalcode4alias" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="externalcode5_name" sortable sort-width="20" :title="externalcode5alias" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="mustmatchlast" sortable title="结果不同于上次警告" width="150" show-overflow align="center">
                          <template v-slot="{ row, rowIndex, columnIndex }">
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-if="row.mustmatchlast == '1'">
                                  <el-checkbox checked disabled></el-checkbox>
                              </div>
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-else>
                                  <el-checkbox disabled></el-checkbox>
                              </div>
                          </template>
                      </vxe-table-column>
                      <vxe-table-column field="alertouthours" sortable title="危急值时效" width="83" show-overflow></vxe-table-column>
                      <vxe-table-column field="hospcode" sortable title="所属院区" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="stopflag" sortable title="停用" width="50" show-overflow align="center">
                          <template v-slot="{ row }">
                              <el-checkbox checked disabled v-if="row.stopflag == '1'"></el-checkbox>
                              <el-checkbox disabled v-else></el-checkbox>
                          </template>
                      </vxe-table-column>
                      <vxe-table-column field="nostat" sortable title="不统计" width="60" show-overflow align="center">
                          <template v-slot="{ row, rowIndex, columnIndex }">
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-if="row.nostat == '1'">
                                  <el-checkbox checked disabled></el-checkbox>
                              </div>
                              <div :key="row.rpt_itemcode+rowIndex+columnIndex" v-else>
                                  <el-checkbox disabled></el-checkbox>
                              </div>
                          </template>
                      </vxe-table-column>
                      <vxe-table-column field="basename" sortable title="基准代码" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="chklastdays" sortable title="结果和上次比较天数" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="chklastratio" sortable title="结果和上次比较百分比差" width="160" show-overflow></vxe-table-column>
                      <vxe-table-column field="chklastabs" sortable title="结果和上次比较数值差" width="150" show-overflow></vxe-table-column>
                  </vxe-table>
              </div>
          </rm-layout-right>
      </div>
      <!--参考值显示-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="参考值显示" :visible.sync="jbxx_reftext_dialogflag">
          <el-input type="textarea" :rows="10" placeholder="参考值显示" v-model="jbxx_ref_text">
          </el-input>
          <div align="right" style="width:100%;margin-top:10px;">
              <el-button @click="jbxx_reftext_saveevent" icon="el-icon-document">保存</el-button>
              <el-button @click="jbxx_reftext_cancelevent" icon="el-icon-close">取消</el-button>
          </div>
      </el-dialog>
      <!--与上次危机值比较-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="与上次危机值比较" :visible.sync="jbxx_limitrules_dialogflag">
          <div>
              病人<el-input style="width:95px" v-model="jbxx_limitrules_dialogflag_hours" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
              小时内结果 <el-select v-model="jbxx_limitrules_dialogflag_change" placeholder="请选择" style="width:100px">
                  <el-option key="+" label="升高" value="+"></el-option>
                  <el-option key="-" label="降低" value="-"></el-option>
                  <el-option key="" label="变化" selected value=""></el-option>
              </el-select>
              超过<el-input style="width:95px" v-model="jbxx_limitrules_dialogflag_cg" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
              ，百分比超过<el-input style="width:95px" v-model="jbxx_limitrules_dialogflag_percent" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>%
          </div>
          <div align="right" style="width:100%;margin-top:10px;">
              <el-button @click="jbxx_limitrules_dialogflag_saveevent" icon="el-icon-document">保存</el-button>
              <el-button @click="jbxx_limitrules_dialogflag_cancelevent" icon="el-icon-close">取消</el-button>
          </div>
      </el-dialog>
      <!--外部代码段-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :visible.sync="jbxx_dialogTable_externalcode" :close-on-click-modal="false" @close="jbxx_externalcode_tableData_close" title="外部代码段" width="642px">
          <vxe-toolbar style="margin-bottom:5px;">
              <template v-slot:buttons>
                  <el-input class="input-with-select" placeholder="输入查询内容" prefix-icon="el-icon-search" size="small" style="max-width:150px;" v-model="jbxx_externalcode_seach"></el-input>
                  <el-button @click="jbxx_externalcode_seachEvent" icon="el-icon-search" size="small" slot="append">查询</el-button>
              </template>
          </vxe-toolbar>
          <vxe-table :data.sync="jbxx_externalcode_tableData" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" @cell-dblclick="jbxx_externalcode_dbclick($event)" border height="300" highlight-current-row highlight-hover-column highlight-hover-row resizable show-overflow size="mini" stripe>
              <vxe-table-column field="rptitemcode" sortable title="项目代码" width="100"></vxe-table-column>
              <vxe-table-column field="rptitemname" sortable title="项目名称" width="100"></vxe-table-column>
              <vxe-table-column field="comment1" sortable title="备用字段1" width="100"></vxe-table-column>
              <vxe-table-column field="comment2" sortable title="备用字段2" width="100"></vxe-table-column>
              <vxe-table-column field="inputcode" sortable title="助记符" width="100"></vxe-table-column>
              <vxe-table-column field="externalmode" sortable title="来源类别" width="100"></vxe-table-column>
          </vxe-table>
      </el-dialog>
      <!--危机时效对应科室-->
      <el-dialog title="危机时效对应科室" :visible.sync="jbxx_outhours_dialogflag" width="500px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false">
          <vxe-table :data.sync="tab_jbxx_outhoursdata" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" border height="300px" highlight-current-row highlight-hover-column highlight-hover-row ref="tab_jbxx_outhoursdata_ref" show-overflow size="mini" stripe :row-class-name="GetRowClassName" show-header-overflow :optimization="{animat: false}" resizable :edit-config="{trigger: 'click', mode: 'cell',showStatus:true}" :edit-rules="tab_jbxx_outhours_validRules" :edit-changing="jbxx_outhours_dialog_editchange">
              <vxe-table-column type="selection" width="40" align="center"></vxe-table-column>
              <vxe-table-column field="req_deptno" sortable title="项目名称" width="220">
                  <template v-slot="{ row }">
                      <rm-ddl-common datatype="dept" dataname="申请科室" v-model="row.req_deptno" width="200px" :appendtobody="true"></rm-ddl-common>
                  </template>
              </vxe-table-column>
              <vxe-table-column key="alertouthours" field="alertouthours" title="危机时效数" :edit-render="{name: 'input',autoselect:true}" width="120px"></vxe-table-column>
          </vxe-table>
          <vxe-toolbar style="margin-top:5px;text-align:right;">
              <template v-slot:buttons>
                  <el-button @click="tab_jbxx_outhours_addEvent" icon="el-icon-plus">增加</el-button>
                  <el-button @click="tab_jbxx_outhours_delEvent" icon="el-icon-delete">删除</el-button>
                  <el-button @click="tab_jbxx_outhours_saveEvent" icon="el-icon-document">保存</el-button>
                  <el-button @click="tab_jbxx_outhours_canelEvent" icon="el-icon-close">取消</el-button>
              </template>
          </vxe-toolbar>
      </el-dialog>
      <!--项目公式-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="计算项目计算公式向导" :visible.sync="jbxx_iscalc_dialogflag" width="950px" @close="jbxx_iscalc_dialogclose">
          <div style="height:590px;">
              <div>
                  <el-input type="textarea" style="width:100%;" height="auto" :disabled="true" resize="none" v-model="jbxx_s_calc_formulatext" :autosize="{ minRows: 4, maxRows: 6}">
                  </el-input>
              </div>
              <div>
                  <el-input id="jbxx_calc_formula_id" type="textarea" style="width:100%;" height="auto" resize="none" v-model="jbxx_s_calc_formula" :autosize="{ minRows: 4, maxRows: 6}" @change="jbxx_iscalc_formula_textchange">
                  </el-input>
              </div>
              <div style="float:left">
                  <div style="height:380px;float:left;margin-top:5px;">
                      <div style="height:30px;">
                          <el-input class="input-with-select" placeholder="输入查询内容" prefix-icon="el-icon-search" size="small" style="max-width:250px;" v-model="jbxx_iscalc_seach" @keyup.enter.native="jbxx_iscalc_getdata()"></el-input>
                          <el-button @click="jbxx_iscalc_getdata" icon="el-icon-search" size="small" slot="append">查询</el-button>
                      </div>
                      <div style="height:390px;width:480px;">
                          <vxe-table :data.sync="jbxx_iscalc_data" :loading="jbxx_iscalc_loading" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" border height="auto" highlight-current-row highlight-hover-column highlight-hover-row ref="Main_Table" resizable show-overflow size="mini" stripe show-header-overflow :optimization="{animat: false}" @cell-dblclick="jbxx_iscalc_data_dbclick" header-align="center">
                              <vxe-table-column field="itemcode_en" sortable title="英文缩写" width="70" show-overflow></vxe-table-column>
                              <vxe-table-column field="rpt_itemname" sortable title="报告项目名称" width="150" show-overflow></vxe-table-column>
                              <vxe-table-column field="itemclassname" sortable title="项目归类" width="60" show-overflow></vxe-table-column>
                              <vxe-table-column field="instrclass" sortable title="仪器大类" width="60" show-overflow></vxe-table-column>
                              <vxe-table-column field="rpt_itemcode" sortable title="报告项目代码" width="90" show-overflow></vxe-table-column>
                          </vxe-table>
                      </div>
                  </div>
              </div>
              <div style="float:left;margin-left:20px;margin-top:30px;">
                  <table>
                      <tr>
                          <td>
                              <el-button style="width:80px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' + ');">+</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' - ');">-</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' * ');">*</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' / ');">/</el-button>
                          </td>
                      </tr>
                      <tr>
                          <td>
                              <el-button style="width:80px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' ( ');">(</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' ) ');">)</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent('SEX1');">性别男</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent('SEX2');">性别女</el-button>
                          </td>
                      </tr>
                      <tr>
                          <td>
                              <el-button style="width:80px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' [AGE] ');">年龄</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_specimen_dialogflag=true;">标本类型</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_dept_dialogflag=true;">申请科室</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_ward_dialogflag=true;">申请病区</el-button>
                          </td>
                      </tr>
                      <tr>
                          <td>
                              <!--暂时注释，之后可能有用，LIS6有，但LIS7310未有验证-->
                              <!-- <el-button style="width:80px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' [REQ_REASON] ');">送检目的</el-button> -->
                          </td>
                          <td>
                              <!--暂时注释，之后可能有用，LIS6有，但LIS7310未有验证-->
                              <!-- <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_addevent(' [PAT_TYPECODE] ');">病人类型</el-button> -->
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;" @click="jbxx_iscalc_hospital_dialogflag=true;">送检医院</el-button>
                          </td>
                          <td>
                              <el-button style="width:80px;margin-left:10px;margin-bottom:5px;padding: 6px 1px !important;" type="primary" @click="jbxx_iscalcGuide_show">常用公式向导</el-button>
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4">
                              <el-divider content-position="left">
                                  <font color="#409EFF">说明</font>
                              </el-divider>
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4" style="text-align:left;">
                              1：计算公式中不可包括其它计算项目，若有需要，一律转化为<br>最原始的计算公式
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4" style="text-align:left;">
                              2：所有项目代号必须使用“[”和“]”括起来
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4" style="text-align:left;">
                              3：表达式可以为一个常数或空字符串
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4">
                              <el-divider content-position="left">
                              </el-divider>
                          </td>
                      </tr>
                      <tr>
                          <td colspan="4" style="text-align:right;">
                              <el-button @click="jbxx_iscalc_dialogflag_saveevent" icon="el-icon-document">确定</el-button>
                              <el-button @click="jbxx_iscalc_dialogflag_cancelevent" icon="el-icon-close">取消</el-button>
                          </td>
                      </tr>
                  </table>
              </div>
          </div>
      </el-dialog>
      <!--标本类型--->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="请选择标本类型" :visible.sync="jbxx_iscalc_specimen_dialogflag">
          <rm-pop-common @change="jbxx_iscalc_specimen_change" @cancel="jbxx_iscalc_specimen_dialogflag=false;" datatype="specimen"></rm-pop-common>
      </el-dialog>
      <!--申请科室-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="请选择申请科室" :visible.sync="jbxx_iscalc_dept_dialogflag">
          <rm-pop-common @change="jbxx_iscalc_dept_change" @cancel="jbxx_iscalc_dept_dialogflag=false;" datatype="dept"></rm-pop-common>
      </el-dialog>
      <!--申请病区-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="请选择申请病区" :visible.sync="jbxx_iscalc_ward_dialogflag">
          <rm-pop-common @change="jbxx_iscalc_ward_change" @cancel="jbxx_iscalc_ward_dialogflag=false;" datatype="ward"></rm-pop-common>
      </el-dialog>
      <!--送检医院-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="请选择送检医院" :visible.sync="jbxx_iscalc_hospital_dialogflag">
          <rm-pop-common @change="jbxx_iscalc_hospital_change" @cancel="jbxx_iscalc_hospital_dialogflag=false;" datatype="hospital"></rm-pop-common>
      </el-dialog>
      <!--基本信息新增、修改弹窗-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" :title="main_dialog_name" :visible.sync="main_dialogflag" width="830px">
          <div style="height:500px;position:relative;width:100%" :key="main_dialogkey">
              <el-form ref="form" :model="Tab_jbxx_Data_dialog">
                  <el-tabs type="border-card" v-model="anchor" style="height:100%;width:100%;position:absolute" @tab-click="handleClick">
                      <el-tab-pane label="基本信息" name="anchor-0">
                          <div style="width:100%" class="scroll_title">
                              <table style="border:1px solid #FFFFFF">
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">项目归类</font>
                                      </td>
                                      <td colspan="3">
                                          <rm-ddl-rptitemclass v-model="Tab_jbxx_Data_dialog.itemclasscode" width="280px" :appendtobody="true" ref="itemclass"></rm-ddl-rptitemclass>
                                      </td>
                                      <td>仪器大类</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="seccode" kindno="INSTRCLASS" v-model="Tab_jbxx_Data_dialog.instrclass" width="280px" :appendtobody="true" key="dialoginstrclass"> </rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">英文缩写</font>
                                      </td>
                                      <td>
                                          <el-input style="width:100%;" v-model="Tab_jbxx_Data_dialog.itemcode_en" @change="English_sm"></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">项目代码</font>
                                      </td>
                                      <td>
                                          <el-input style="width:100%;" v-model="Tab_jbxx_Data_dialog.rpt_itemcode" @change="jbxx_rptitemcode_change" :disabled="jbxx_rptitemcode_readonly">
                                          </el-input>
                                      </td>
                                      <td>允许CV(%)</td>
                                      <td>
                                          <el-input style="width:92px;" v-model="Tab_jbxx_Data_dialog.qccv"></el-input>
                                      </td>
                                      <td>允许TEa(%)</td>
                                      <td>
                                          <el-input style="width:100px;" v-model="Tab_jbxx_Data_dialog.qctea"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">中文名称</font>
                                      </td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.rpt_itemname" @change="getInputCode(Tab_jbxx_Data_dialog.rpt_itemname)"></el-input>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">报告代码</font>
                                      </td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.rptcode"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>项目备注</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.itemtips"></el-input>
                                      </td>
                                      <td>统计代码</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.statcode"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>英文名称</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.itemname_en"></el-input>
                                      </td>
                                      <td>频次</td>
                                      <td colspan="3">
                                          <el-input style="width:80px" v-model="Tab_jbxx_Data_dialog.seq" :disabled="jbxx_seq_readonly"></el-input>&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.nostat">不参与统计</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.stopflag">停用</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">结果类型</font>
                                      </td>
                                      <td style="width:110px">
                                          <el-select v-model="Tab_jbxx_Data_dialog.resulttype" placeholder="请选择" style="width:100%">
                                              <el-option key="1" label="数值型" value="1"></el-option>
                                              <el-option key="2" label="文字型" value="2"></el-option>
                                              <el-option key="3" label="阴阳性" value="3"></el-option>
                                              <el-option key="4" label="数字文字混合" value="4"></el-option>
                                          </el-select>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">小数位数</font>
                                      </td>
                                      <td style="width:110px">
                                          <el-select v-model="Tab_jbxx_Data_dialog.dec_digits" placeholder="请选择" style="width:100%">
                                              <el-option key="-1" label="保留原始结果" value="-1"></el-option>
                                              <el-option key="0" label="0位" value="0"></el-option>
                                              <el-option key="1" label="1位" value="1"></el-option>
                                              <el-option key="2" label="2位" value="2"></el-option>
                                              <el-option key="3" label="3位" value="3"></el-option>
                                              <el-option key="4" label="4位" value="4"></el-option>
                                              <el-option key="-2" label="科学计数法" value="-2"></el-option>
                                          </el-select>
                                      </td>
                                      <td>
                                          <font color="#F56C6C">项目类型</font>
                                      </td>
                                      <td colspan="2">
                                          <el-select v-model="Tab_jbxx_Data_dialog.germflag" placeholder="请选择" style="width:150px">
                                              <el-option key="1" label="培养阴性结果" value="1"></el-option>
                                              <el-option key="5" label="培养阴性过程" value="5"></el-option>
                                              <el-option key="2" label="致病菌" value="2"></el-option>
                                              <el-option key="3" label="正常菌种" value="3"></el-option>
                                              <el-option key="4" label="涂片结果" value="4"></el-option>
                                          </el-select>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.resulttwice">结果需复核</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>单位</td>
                                      <td>
                                          <el-autocomplete class="inline-input" v-model="Tab_jbxx_Data_dialog.unit" :fetch-suggestions="querySearch" placeholder="请输入内容" @select="handleSelect">
                                          </el-autocomplete>
                                      </td>
                                      <td>价格</td>
                                      <td>
                                          <el-input style="width:100%" v-model="Tab_jbxx_Data_dialog.price"></el-input>
                                      </td>
                                      <td>申请项目</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="reqitem" v-model="Tab_jbxx_Data_dialog.req_itemcode" width="280px" :appendtobody="true" key="dialogreq_itemcode"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>测试方法</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.testmethod"></el-input>
                                      </td>
                                      <td>急诊申请项目</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="reqitem" v-model="Tab_jbxx_Data_dialog.req_itemcode_stat" width="280px" :appendtobody="true" key="dialogreq_itemcode_stat"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>输入码</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.inputcode"></el-input>
                                      </td>
                                      <td>Gram(一级分类)</td>
                                      <td colspan="2">
                                          <el-select v-model="Tab_jbxx_Data_dialog.germgram" style="width:150px;" disabled>
                                              <el-option v-for="(item,index) in $opt.gramOption" :key="index" :value="item.value" :label="item.label"></el-option>
                                          </el-select>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.isgermgroup" @change="isgermgroupChange">菌属标志</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>默认取值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.defaultval"></el-input>
                                      </td>
                                      <td>菌科(二级分类)</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labgermkind" dataname="菌科(二级分类)" v-model="Tab_jbxx_Data_dialog.germkind" width="280px" :appendtobody="true" key="dialoggermkind" :disabled="disabledKindGroup" @change="germkindChange"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果1默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.defaultresult1"></el-input>
                                      </td>
                                      <td>菌属(三级分类)</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="germgroup" dataname="菌属(三级分类)" v-model="Tab_jbxx_Data_dialog.groupitemcode" width="280px" :appendtobody="true" :disabled="!disabledKindGroup" @change="germgroupChange" key="dialoggroupitemcode" readonly></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果2默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.defaultresult2"></el-input>
                                      </td>
                                      <td>默认药敏组合</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labmedgroup" dataname="药敏组合" v-model="Tab_jbxx_Data_dialog.germmedgroup" width="280px" :appendtobody="true" key="dialoggermmedgroup"></rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果3默认值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.defaultresult3"></el-input>
                                      </td>
                                      <td>基因输入模板</td>
                                      <td colspan="3">
                                          <rm-ddl-common datatype="labgeneinputmdl" dataname="基因输入模板" v-model="Tab_jbxx_Data_dialog.geneinputmdlid" width="280px" :appendtobody="true" key="dialoggeneinputmdlid">
                                          </rm-ddl-common>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <font color="#F56C6C">默认文字结果标志</font>
                                      </td>
                                      <td>
                                          <el-select v-model="Tab_jbxx_Data_dialog.textresultflag" placeholder="请选择">
                                              <el-option key="M" label="正常[M]" value="M"></el-option>
                                              <el-option key="H" label="偏高[H]" value="H"></el-option>
                                              <el-option key="L" label="偏低[L]" value="L"></el-option>
                                              <el-option key="P" label="阳性[P]" value="P"></el-option>
                                              <el-option key="Q" label="弱阳性[Q]" value="Q"></el-option>
                                              <el-option key="E" label="错误[E]" value="E"></el-option>
                                              <el-option key="N" label="阴性[N]" value="N"></el-option>
                                          </el-select>
                                      </td>
                                      <td>样本质量</td>
                                      <td>
                                          <el-select v-model="Tab_jbxx_Data_dialog.samplequality" placeholder="请选择" clearable>
                                              <el-option :key="index" v-for="(item,index) in $opt.samplequalityOption" :label="item.label" :value="item.value"></el-option>
                                          </el-select>
                                      </td>
                                      <td>计算用默认取值</td>
                                      <td colspan="3">
                                          <el-input style="width:100px" v-model="Tab_jbxx_Data_dialog.defcalcvalue"></el-input>
                                          WhoNet代码 <el-input style="width:105px;" v-model="Tab_jbxx_Data_dialog.germwhocode"></el-input>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane label="参考/复查值范围" name="anchor-1">
                          <div style="width:100%" class="scroll_title">
                              <table border="0">
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.ref_bysex" @change="iscancelchk($event,'sex')">参考范围性别有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.ref_byage" @change="iscancelchk($event,'age')">参考范围年龄有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.ref_byspecimen" @change="iscancelchk($event,'specimen')">参考范围标本有关</el-checkbox>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.ref_byphysicycle" true-label="1" false-label="0" @change="iscancelchk($event,'physicycle')">参考范围生理周期有关
                                          </el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.ref_bydiag" true-label="1" false-label="0" @change="iscancelchk($event,'diag')">参考范围诊断相关</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>参考值低值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.ref_l" @input="jbxx_ref_change()" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td>参考值高值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.ref_h" @input="jbxx_ref_change()" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td>参考值显示</td>
                                      <td colspan="3">
                                          <el-input type="text" style="width:280px" v-model="Tab_jbxx_Data_dialog.ref_text"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>需复查低值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.redo_l" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td>需复查高值</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.redo_h" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td colspan="4">
                                          <el-button size="small" @click="jbxx_reftextFun(Tab_jbxx_Data_dialog.ref_text)">多行参考值向导...</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          病人复查前后结果比较超出<el-input style="width:60px" v-model="Tab_jbxx_Data_dialog.redo_ratio" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>%
                                          且数值差超出<el-input style="width:60px" v-model="Tab_jbxx_Data_dialog.redo_abs" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>审核前提醒
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane label="审核相关" name="anchor-2">
                          <div style="width:100%" class="scroll_title">
                              <table>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.autochkflag">允许自动审核</el-checkbox>

                                      </td>
                                      <td colspan="4">
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.sameflagautochkok">结果标志和上次相同即自动审核通过</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.autochk_txtresult">未列文字结果不可自动审核</el-checkbox>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.autochk_qtlt">包含&lt;&gt;也按数值判断自动审核</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;自动审核低值
                                      </td>
                                      <td style="padding-left:11px;text-align:left;">
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.autochk_l" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                          自动审核高值 <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.autochk_h" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          病人两次结果在<el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.chklastdays" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                          天内比较超出
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.chklastratio" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>%且数值差超出&nbsp;<el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.chklastabs" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>审核前提醒
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.mustmatchlastflag">结果标志和上次不同警告</el-checkbox>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.mustmatchlast">结果和上次不同警告</el-checkbox>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane label="危急值" name="anchor-3">
                          <div style="width:100%" class="scroll_title">
                              <table>
                                  <tr>
                                      <td>与上次比较危急值</td>
                                      <td colspan="3">
                                          <el-input style="width:280px" v-model="Tab_jbxx_Data_dialog.limit_rule" readonly placeholder="双击弹窗" @dblclick.native="tab_jbxx_limitrule_dbclick();">
                                          </el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>危急值分类</td>
                                      <td>
                                          <!-- <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.alertkind"></el-input> -->
                                          <el-select v-model="Tab_jbxx_Data_dialog.alertkind" style="width:95px">
                                              <el-option v-for="(item,index) in $opt.alterKindOption" :key="index" :value="item.value" :label="item.label"></el-option>
                                          </el-select>
                                      </td>
                                      <td>
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.autoalert">危急值自动上报</el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="text-align:right;">病人危急值在</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.alertouthours" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td colspan="2">
                                          小时内重复出现不再上报(0或空=总是上报，-1=本次住院)
                                          <el-button size="small" @click="tab_jbxx_getouthour_event">对应申请科室</el-button>
                                      </td>
                                  </tr>

                              </table>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane label="计算公式" name="anchor-4">
                          <div style="width:100%" class="scroll_title">
                              <table>
                                  <tr>
                                      <td colspan="8">
                                          <el-checkbox v-model="Tab_jbxx_Data_dialog.iscalc">
                                              <span color="#409EFF">计算公式</span>
                                          </el-checkbox>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>计算公式</td>
                                      <td colspan="6">
                                          <el-input style="width:590px" readonly v-model="Tab_jbxx_Data_dialog.calc_formula"></el-input>
                                      </td>
                                      <td>
                                          <el-button size="small" :disabled="!Tab_jbxx_Data_dialog.iscalc" @click="jbxx_iscalc_click">公式向导</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>计算公式显示</td>
                                      <td colspan="7">
                                          <el-input style="width:590px" readonly="" v-model="Tab_jbxx_Data_dialog.calc_formulatext"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果1计算公式</td>
                                      <td colspan="6">
                                          <el-input style="width:590px" readonly v-model="Tab_jbxx_Data_dialog.result1formula"></el-input>

                                      </td>
                                      <td>
                                          <el-button @click.native="opendialogresult(1)">公式向导</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果2计算公式</td>
                                      <td colspan="6">
                                          <el-input style="width:590px" readonly v-model="Tab_jbxx_Data_dialog.result2formula"></el-input>

                                      </td>
                                      <td>
                                          <el-button @click.native="opendialogresult(2)">公式向导</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>结果3计算公式</td>
                                      <td colspan="6">
                                          <el-input style="width:590px" readonly v-model="Tab_jbxx_Data_dialog.result3formula"></el-input>

                                      </td>
                                      <td>
                                          <el-button @click.native="opendialogresult(3)">公式向导</el-button>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane label="外部代码及其它" name="anchor-5">
                          <div style="width:100%" class="scroll_title">
                              <table>
                                  <tr>
                                      <td>{{externalcode1alias}}</td>
                                      <td colspan="3">
                                          <el-input @dblclick.native="jbxx_open_externalcodeDialog('e1')" placeholder="请输入或双击选择" v-model="Tab_jbxx_Data_dialog.externalcode1"></el-input>
                                      </td>
                                      <td>{{externalcode4alias}}</td>
                                      <td colspan="3">
                                          <el-input style="width:240px" v-model="Tab_jbxx_Data_dialog.externalcode4" placeholder="请输入或双击选择" @dblclick.native="jbxx_open_externalcodeDialog('e4')">
                                          </el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>{{externalcode2alias}}</td>
                                      <td colspan="3">
                                          <el-input @dblclick.native="jbxx_open_externalcodeDialog('e2')" placeholder="请输入或双击选择" v-model="Tab_jbxx_Data_dialog.externalcode2"></el-input>
                                      </td>
                                      <td>{{externalcode5alias}}</td>
                                      <td colspan="3">
                                          <el-input style="width:240px" v-model="Tab_jbxx_Data_dialog.externalcode5" placeholder="请输入或双击选择" @dblclick.native="jbxx_open_externalcodeDialog('e5')">
                                          </el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>{{externalcode3alias}}</td>
                                      <td colspan="3">
                                          <el-input @dblclick.native="jbxx_open_externalcodeDialog('e3')" placeholder="请输入或双击选择" v-model="Tab_jbxx_Data_dialog.externalcode3"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="8" style="text-align:left;">
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                          建议：外部代码1 用作HIS系统对照，代码2 用作体检系统对照，代码3 用作rmlis4的对照
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>基准代码</td>
                                      <td colspan="7">
                                          <el-input style="width:600px" v-model="Tab_jbxx_Data_dialog.basecode"></el-input>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="text-align:right;">结果超出</td>
                                      <td>
                                          <el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.dilutionlimit" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                      <td colspan="2" style="text-align:left;">需稀释后测试，默认稀释倍数<el-input style="width:95px" v-model="Tab_jbxx_Data_dialog.dilutionrate" oninput="value=value.replace(/[^\-?\d.]/g,'')"></el-input>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </el-tab-pane>
                  </el-tabs>
              </el-form>
          </div>
          <div style="margin-top:5px;text-align:right;margin-right:10px;">
              <el-checkbox v-model="savenotclosedialog" true-label="1" false-label="0">保存后不关闭弹窗</el-checkbox>
              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              <el-button icon="el-icon-document" @click="main_dialog_saveEvent">保存</el-button>
              <el-button icon="el-icon-close" @click="main_dialog_canelEvent">取消</el-button>
          </div>
      </el-dialog>
      <!--导出-->
      <el-dialog title="请选择要导出的格式" :visible.sync="ExportEventDiv" width="500px">
          <div style="width:100%;height:300px;border:1 px solid #CCC">
              <vxe-table :data="msgList" :show-header="true" height="auto" highlight-current-row highlight-hover-row @current-change="ExportChangeEvent">
                  <vxe-table-column field="msg" title="导出格式" header-align="center">
                      <template v-slot="{row}">
                          <div class="msg-item">{{row.msg}}</div>
                      </template>
                  </vxe-table-column>
              </vxe-table>
          </div>
          <span slot="footer" class="dialog-footer">
              <el-button type="primary" @click="tab_jbxx_exportEvent">确 定</el-button>
              <el-button @click="ExportEventDiv = false">取 消</el-button>
          </span>
      </el-dialog>
      <!--结果计算公式--->
      <el-dialog title="文字结果计算公式" :visible.sync="dialogResult" width="800px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false">
          <div style="width:100%;height:500px;border:1 px solid #CCC">
              <rm-layout-top splitcolor="white" :splitwidth=5 :fixsize=70 :canDrag="false">
                  <template v-slot:fix>
                      <el-input type="textarea" v-model="result_text" :rows="3" style="width:100%" id="result_calc_formula_id"></el-input>
                  </template>
                  <rm-layout-right splitcolor="white" movingcolor="#0000ff" :splitwidth=5 :fixsize=450 :canDrag="false">
                      <template v-slot:fix>
                          <div style="width:450px">
                              <table>
                                  <tr>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' + ');">+</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' - ');">-</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' * ');">*</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' / ');">/</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' ( ');">(</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' ) ');">)</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent('SEX1');">性别男</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent('SEX2');">性别女</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="result_iscalc_addevent(' [AGE] ');">年龄</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="jbxx_iscalc_specimen_dialogflag=true;">标本类型</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="jbxx_iscalc_dept_dialogflag=true;">申请科室</el-button>
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="jbxx_iscalc_ward_dialogflag=true;">申请病区</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="3">
                                      </td>
                                      <td>
                                          <el-button style="width:80px;margin-bottom:2px;" @click="jbxx_iscalc_hospital_dialogflag=true;">送检医院</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4">
                                          <el-divider content-position="left">
                                              <font color="#409EFF">说明</font>
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:left;">
                                          仅支持[R]或[@R]的表达式，[R]就是当前项目的result_num，[@R]表示result_str
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4">
                                          <el-divider content-position="left">
                                          </el-divider>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="4" style="text-align:right;">
                                          <el-button @click="result_saveevent" icon="el-icon-document">确定</el-button>
                                          <el-button @click="dialogResult=false" icon="el-icon-close">取消</el-button>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </template>
                      <div style="height:100%;width:100%;">
                          <vxe-table :data="resultData" :show-header="true" height="auto" highlight-current-row highlight-hover-row :select-config="{tigger: 'cell'}" @cell-dblclick="result_iscalc_data_dbclick" border size="mini" show-header-overflow resizable stripe>
                              <vxe-table-column type="index" title="NO." width="40" header-align="center">
                              </vxe-table-column>
                              <vxe-table-column field="result_num" title="数字结果(双击)" width="100" header-align="center">
                              </vxe-table-column>
                              <vxe-table-column field="result_str" title="文本结果(双击)" width="100" header-align="center">
                              </vxe-table-column>
                          </vxe-table>
                      </div>
                  </rm-layout-right>
              </rm-layout-top>
          </div>
      </el-dialog>
      <!--常用公式向导--->
      <el-dialog title="常用计算项目向导" :visible.sync="jbxx_iscalcGuide_dialog" width="900px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false">
          <div style="height:500px" :key="CalcTestKey">
              <rm-layout-top splitcolor="white" :splitwidth=5 :fixsize=100>
                  <template v-slot:fix>
                      <div style="height:100px;border:1px solid #CCC" v-html="calcGuide_calcformula">
                      </div>
                  </template>
                  <rm-layout-bottom splitcolor="white" :splitwidth=0 :canDrag=false>
                      <template v-slot:fix>
                          <div style="float:right">
                              <table style="float:right">
                                  <tr>
                                      <td>
                                          <el-button @click.native="ExportCalcGuide">导出CalcGuide</el-button>
                                      </td>
                                      <td>
                                          <el-input v-model="CalcTestValue" readonly></el-input>
                                      </td>
                                      <td>
                                          <el-button @click.native="CalcTest($event)">计算测试</el-button>
                                      </td>
                                      <td>
                                          <el-button @click.native="SureCalcGuide">确定</el-button>
                                      </td>
                                      <td>
                                          <el-button @click.native="jbxx_iscalcGuide_dialog=false">取消</el-button>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                      </template>
                      <rm-layout-right splitcolor="white" movingcolor="#0000ff" :splitwidth=5 :fixsize=500>
                          <template v-slot:fix>
                              <div style="height:100%">
                                  <vxe-table show-overflow ref="prxTable" height="auto" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" :mouse-config="{selected: true}" :data.sync="Lab_CalcItemData" border size="mini" show-header-overflow highlight-current-row highlight-hover-row resizable stripe :edit-config="{trigger: 'click', mode: 'cell',showStatus: true,showIcon:false}" @cell-dblclick="calcGuideDblclick">
                                      <vxe-table-column field="calcformulaitem" title="计算要素" width="140" sortable header-align="center" :formatter="['formatSelect', calcGuideOption]"></vxe-table-column>
                                      <vxe-table-column field="testvalue" title="输入测试结果" width="90" header-align="center" :edit-render="{name:'input',autoselect:true}"></vxe-table-column>
                                      <vxe-table-column field="rpt_itemname" title="报告项目名称" width="110" header-align="center"></vxe-table-column>
                                      <vxe-table-column field="itemcode_en" title="英文缩写" width="70" header-align="center"></vxe-table-column>
                                      <vxe-table-column field="unit" title="单位" width="50" header-align="center" align="center"></vxe-table-column>
                                      <vxe-table-column field="testmethod" title="测试方法" width="80" sortable header-align="center"></vxe-table-column>
                                      <vxe-table-column field="ref_text" title="参考值显示" width="80" header-align="center"></vxe-table-column>
                                      <vxe-table-column field="rpt_itemcode" title="报告项目代码" width="80" header-align="center"></vxe-table-column>
                                  </vxe-table>
                              </div>
                          </template>
                          <div style="height:100%;width:100%;">
                              <vxe-table show-overflow ref="plxTable" height="auto" :loading="Lab_CalcGuideloading" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" :mouse-config="{selected: true}" :data.sync="Lab_CalcGuideData" border size="mini" show-header-overflow highlight-current-row highlight-hover-row resizable stripe :edit-config="{trigger: 'click', mode: 'cell',showStatus: true,showIcon:false}" @current-change="currentCalcGuideChangeEvent">
                                  <vxe-table-column field="rpt_itemname" title="项目名称" width="300" sortable header-align="center"></vxe-table-column>
                                  <vxe-table-column field="calcformula" title="计算公式" width="200" header-align="center"></vxe-table-column>
                                  <vxe-table-column field="note" title="备注说明" width="70" header-align="center"></vxe-table-column>
                                  <vxe-table-column field="seq" title="序号" width="50" header-align="center" align="center"></vxe-table-column>
                                  <vxe-table-column field="calcguideid" title="公式ID" width="50" header-align="center" align="center"></vxe-table-column>
                              </vxe-table>
                          </div>
                      </rm-layout-right>
                  </rm-layout-bottom>
              </rm-layout-top>
          </div>
      </el-dialog>
      <!--报告项目选择--->
      <el-dialog title="报告项目选择" :visible.sync="dialogrptitem" width="900px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false">
          <div style="height:500px">
              <rm-layout-top splitcolor="white" :splitwidth=5 :fixsize=40 :canDrag="false">
                  <template v-slot:fix>
                      <div style="height:40px;border:1px solid #CCC">
                          <table>
                              <tr>
                                  <td>报告单元</td>
                                  <td>
                                      <rm-ddl-rptunit prgno="LIS811" v-model="calcguide.rptunitid" width="200px"></rm-ddl-rptunit>
                                  </td>
                                  <td>项目归类</td>
                                  <td>
                                      <rm-ddl-rptitemclass v-model="calcguide.itemclasscode" width="200px"></rm-ddl-rptitemclass>
                                  </td>
                                  <td>快速查找</td>
                                  <td>
                                      <el-input v-model="calcguide.txtsearch" placeholder="项目代码|名称|缩写|拼音码" @keyup.enter.native="calcGuideQueryRptitem"></el-input>
                                  </td>
                                  <td>
                                      <el-button type="primary" @click.native="calcGuideQueryRptitem">查询</el-button>
                                  </td>
                                  <td>
                                      <el-button @click.native="calcGuideSureRptitem">确定</el-button>
                                  </td>
                                  <td>
                                      <el-button @click.native="dialogrptitem=false">取消</el-button>
                                  </td>
                              </tr>
                          </table>
                      </div>
                  </template>
                  <div style="height:100%;width:100%;">
                      <vxe-table show-overflow ref="rptitemTable" height="auto" :select-config="{reserve: true}" :sort-config="{trigger: 'cell'}" :mouse-config="{selected: true}" :data.sync="Lab_CalcrptItemData" border size="mini" :loading="Lab_CalcrptItemLoading" show-header-overflow highlight-current-row highlight-hover-row resizable stripe :edit-config="{trigger: 'click', mode: 'cell',showStatus: true,showIcon:false}" @cell-dblclick="calcGuideSureRptitem">
                          <vxe-table-column field="itemclassname" title="项目归类" width="100" sortable header-align="center"></vxe-table-column>
                          <vxe-table-column field="rpt_itemcode" title="报告项目代码" width="100" header-align="center"></vxe-table-column>
                          <vxe-table-column field="itemcode_en" title="英文缩写" width="70" header-align="center"></vxe-table-column>
                          <vxe-table-column field="rpt_itemname" title="报告项目名称" width="130" header-align="center"></vxe-table-column>
                          <vxe-table-column field="unit" title="单位" width="50" header-align="center" align="center"></vxe-table-column>
                          <vxe-table-column field="testmethod" title="测试方法" width="80" sortable header-align="center"></vxe-table-column>
                          <vxe-table-column field="ref_text" title="参考值显示" width="80" header-align="center"></vxe-table-column>
                          <vxe-table-column field="instrclass" title="仪器大类" width="80" header-align="center" align="center"></vxe-table-column>
                          <vxe-table-column field="germflag_name" title="项目类型" width="80" sortable header-align="center"></vxe-table-column>
                          <vxe-table-column field="inputcode" title="输入码" width="80" header-align="center"></vxe-table-column>
                      </vxe-table>
                  </div>
              </rm-layout-top>
          </div>
      </el-dialog>
      <el-dialog title="请选择项目导入模式" :visible.sync="importRptitemDialog" width="500px">
          <div class="importrpt-model">
              <div style="height: 100%;">
                  <vxe-table ref="rptmodelTable" :data.sync="importrptmodelList" class="mytable-style" height="auto" resizable stripe :keyboard-local-config="keyLocalConfig" border size="mini" highlight-current-row :show-header="false" @cell-dblclick="chooseRptmodel">
                      <vxe-table-column field="name" title=" " width="400"></vxe-table-column>
                  </vxe-table>
              </div>
              <div class="importrpt-modelbtn">
                  <div>
                      <el-button @click="chooseRptmodel">确定</el-button>
                  </div>
                  <div>
                      <el-button @click="importRptitemDialog = false;">取消</el-button>
                  </div>
              </div>
          </div>
      </el-dialog>
      <!-- 报告项目基本信息导入 -->
      <el-dialog title="LIS811 细菌字典" :visible.sync="exeimportRptDialog" v-if="exeimportRptDialog" width="800px" :before-close="clearImportdata">
          <div>
              <div style="height: 500px;">
                  <vxe-table ref="importrptTable" :data.sync="importrptList" class="mytable-style" height="auto" resizable stripe border size="mini" highlight-current-row header-align="center">
                      <vxe-table-column field="itemclasscode" sortable title="项目归类" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemname" sortable title="报告项目名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemcode" sortable title="报告项目代码" width="90" show-overflow></vxe-table-column>
                      <vxe-table-column field="germflag_name" sortable title="项目类型" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="instrclass" sortable title="仪器大类" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemcode_en" sortable title="英文缩写" width="58" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemname_en" sortable title="英文名称" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="resulttype_name" sortable title="结果类型" width="78" show-overflow></vxe-table-column>
                      <vxe-table-column field="textresultflag_name" sortable title="默认文字结果标志" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="unit" sortable title="单位" width="50" show-overflow></vxe-table-column>
                      <vxe-table-column field="dec_digits_name" sortable title="小数位数" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="rptcode" sortable title="报告单代码" width="80" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_l" sortable title="参考低值" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_h" sortable title="参考高值" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="ref_text" sortable title="参考值显示" width="80" show-overflow></vxe-table-column>
                  </vxe-table>
              </div>
              <div style="margin-top: 10px;">
                  <el-button @click="deleteRptrow">删除</el-button>
                  <el-button @click="cancelDatachange">取消</el-button>
                  <el-button @click="saveRptimport">保存</el-button>
                  <el-button @click="clearImportdata">退出</el-button>
                  <span v-if="importNumtext" style="margin-left: 20px;color: blue;">{{importNumtext}}</span>
              </div>
          </div>
      </el-dialog>
      <!-- 细菌项目导入并匹配 -->
      <el-dialog v-el-drag-dialog title="细菌项目导入并匹配" :visible.sync="exeimportMatchRptDialog" v-if="exeimportMatchRptDialog" width="80%" :before-close="clearImportMatchdata">
          <div>
              <div style=" height:35px;">
                  <table>
                      <tr>
                          <td>新增数据项目归类</td>
                          <td>
                              <rm-ddl-rptitemclass @change="importrptitemclassChange" v-model="import_itemclasscode" authflag="1" width="210px"></rm-ddl-rptitemclass>
                          </td>
                          <td>新增数据仪器大类</td>
                          <td>
                              <rm-ddl-common @change="importinstrclassChange" datatype="seccode" kindno="INSTRCLASS" v-model="import_instrclass" width="200px"></rm-ddl-common>
                          </td>
                          <td>
                              <el-checkbox v-model="CHNMatchCoverEN" true-label="1" false-label="0" @change="changeupdatetype">
                                  中文名称匹配覆盖原有英文名称
                              </el-checkbox>
                          </td>
                          <td>
                              <el-checkbox v-model="ENMatchCoverCHN" true-label="1" false-label="0" @change="changeupdatetype">
                                  英文名称匹配覆盖原有中文名称
                              </el-checkbox>
                          </td>
                          <td>
                              <el-checkbox v-model="showonlyupdate" true-label="1" false-label="0" @change="changeonlyshowupdate">
                                  仅显示需要更新的记录
                              </el-checkbox>
                          </td>
                      </tr>
                  </table>
              </div>
              <div style="height: 400px;">
                  <vxe-table ref="importMatchrptTable" :data.sync="importMatchrptList" class="mytable-style" height="auto" resizable stripe border size="mini" highlight-current-row header-align="center">
                      <vxe-table-column field="importitemcode" sortable title="导入细菌代码" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="importitemname" sortable title="导入细菌中文名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="presentitemname" sortable title="当前库细菌中文名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="importitemname_en" sortable title="导入英文名称" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="presentitemname_en" sortable title="当前库细菌英文名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="matchitemcode" sortable title="匹配后细菌代码" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="updatetype" sortable title="更新模式" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="importgermgram" sortable title="革兰氏性质" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="importgermflagname" sortable title="分类" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="importgroupitemname" sortable title="菌属" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="importisgermgroup" sortable title="菌属标志" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="importwhonetcode" sortable title="WHONET代码" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="importitemclassname" sortable title="项目归类" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="importinstrclassname" sortable title="仪器大类" width="70" show-overflow></vxe-table-column>
                  </vxe-table>
              </div>
              <div style="height: 400px;">
                  <vxe-table ref="MatchrptTable" :data.sync="MatchrptList" class="mytable-style" height="auto" resizable stripe border size="mini" highlight-current-row header-align="center">
                      <vxe-table-column field="germflag_name" sortable title="细菌标志" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemcode_en" sortable title="英文缩写" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemname" sortable title="报告项目名称" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemname_en" sortable title="英文名称" width="70" show-overflow></vxe-table-column>
                      <vxe-table-column field="rpt_itemcode" sortable title="报告项目代码" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemclassname" sortable title="项目归类" width="120" show-overflow></vxe-table-column>
                      <vxe-table-column field="rptcode" sortable title="报告单代码" width="100" show-overflow></vxe-table-column>
                      <vxe-table-column field="itemtips" sortable title="项目备注" width="130" show-overflow></vxe-table-column>
                      <vxe-table-column field="inputcode" sortable title="输入码" width="70" show-overflow></vxe-table-column>
                  </vxe-table>
              </div>
              <div style="margin-top: 10px;">
                  <el-button @click="btnimportMatch">导入</el-button>
                  <el-button @click="saveRptimportMatch">确定</el-button>
                  <el-button @click="clearImportMatchdata">退出</el-button>
                  <span v-if="importNumtext" style="margin-left: 20px;color: blue;">{{importNumtext}}</span>
                  <div class="upload-button">
                      <el-upload ref="uploadmatch" :action="url" accept=".xlsx" :on-change="fileChange" :show-file-list="showFile" :data="upmatchdata" :http-request="uploadMatchOpt">
                          <el-button size="small" plain>选择文件</el-button>
                          <!-- <div slot="tip" class="el-upload__tip">只能上传DAT(*dat)文件，且不超过10M</div> -->
                      </el-upload>
                  </div>
              </div>
          </div>
      </el-dialog>
      <el-dialog width="800px" :append-to-body="true" :close-on-click-modal="false" title="文字编辑" :visible.sync="uploadpasswordVisible" v-if="uploadpasswordVisible">
          <div style="font-size:12px;padding: 0 0 0 5px; text-align: right;">
              <el-radio-group v-model="isoverride" style="margin-right: 5px;">
                  <el-radio :label="0" selected size="mini">直接覆盖原来所有的报告项目(效率较低)</el-radio>
                  <el-radio :label="1" size="mini">不覆盖，全部删除后再导入</el-radio>
              </el-radio-group>
              <el-button @click="uploadpasswordSure()">确定</el-button>
              <el-button @click="uploadpasswordVisible = false;">取消</el-button>
          </div>
          <div style="margin-top: 5px;height: 50px;">
              <el-input ref="uploadpasswordinput" placeholder="请输入'导入'两字" v-model="uploadpassword" style="height: 50px;"></el-input>
          </div>
      </el-dialog>
      <el-dialog title="文件导入提示" :visible.sync="fileimportnotifyVisible" width="30%">
          <el-form :model="fileimportform">
              <el-form-item label="上传文件" :label-width="formLabelWidth">
                  <el-upload ref="uploadDat" action="" :limit=limitNum :auto-upload="false" accept=".dat" :before-upload="beforeUploadFile" :on-change="fileimportChange" :on-exceed="exceedFile" :file-list="fileList">
                      <el-button size="small" plain>选择文件</el-button>
                      <div slot="tip" class="el-upload__tip">只能上传DAT(*dat)文件，且不超过10M。</div>
                  </el-upload>
              </el-form-item>
          </el-form>
          <span slot="footer" class="dialog-footer">
              <!-- <template>
                  <div style="font-size:12px;float:top;padding-top:3px;background-color:#fff;">
                      <el-progress :text-inside="true" :stroke-width="15" :percentage=percentage status="success"></el-progress>
                  </div>
                  <div style="clear:both"></div>
              </template> -->
              <el-button size="small" type="primary" @click="uploadFile()">立即上传</el-button>
              <el-button @click="fileimportnotifyVisible = false">取 消</el-button>
          </span>
      </el-dialog>
  </div>
</template>

<script>
import { Promise } from "q";
import { invalid } from "moment";
import XE from "xe-utils"; //引入工具类
import XLSX from "xlsx";
import FileSaver from "file-saver";
import axios from "axios";
XE.mixin({
  // 自定义全局的格式化处理函数
  formatSelect(cellValue, list) {
      let item = list.find((item) => item.value == cellValue);
      return item ? item.label : cellValue;
  },
});
import XEUtils from "xe-utils";
export default {
  name: "LIS811",
  data() {
      return {
          resultkindOption: [
              { label: "默认", value: "0" },
              { label: "结果1", value: "1" },
              { label: "结果2", value: "2" },
              { label: "结果3", value: "3" },
              { label: "结果4", value: "4" },
              { label: "结果5", value: "5" },
              { label: "结果6", value: "6" },
          ],
          result_flagOption: [
              { label: "", value: "" },
              { label: "正常[M]", value: "M" },
              { label: "偏高[H]", value: "H" },
              { label: "偏低[L]", value: "L" },
              { label: "阳性[P]", value: "P" },
              { label: "弱阳性[Q]", value: "Q" },
              { label: "错误[E]", value: "E" },
              { label: "阴性[N]", value: "N" },
          ],
          patSexOption: [
              { label: "男", value: "1" },
              { label: "女", value: "2" },
              { label: "无关", value: "All" },
          ],
          resTypeOption: [
              { label: "数值型", value: "1" },
              { label: "文字型", value: "2" },
              { label: "阴阳性", value: "3" },
              { label: "数字文字混合", value: "4" },
          ],
          dec_digitsOption: [
              { label: "保留原始结果", value: "-1" },
              { label: "0位", value: "0" },
              { label: "1位", value: "1" },
              { label: "2位", value: "2" },
              { label: "3位", value: "3" },
              { label: "4位", value: "4" },
              { label: "科学计数法", value: "-2" },
          ],
          diff_signOption: [
              { label: "增高", value: "1" },
              { label: "变化", value: "0" },
              { label: "降低", value: "-1" },
          ],
          calcGuideOption: [
              {
                  label: "年龄",
                  value: "AGE",
              },
              {
                  label: "性别",
                  value: "SEX",
              },
          ],
          anchor: "anchor-0",
          buttonwidth: "",
          search_gram: "",
          seach_germkind: "",
          search_rptunitname: "",
          seach_germflag: "2",
          seach_germgroup: "",
          seach_keystr: "",
          seach_stopflag: 0,
          MainTableData: [],
          tableColumn: [],
          MainLoading: false,
          Tab_jbxx_Data_dialog: {},
          Tab_jbxx_Data: {},
          main_dialogflag: false,
          main_dialog_name: "",
          tab_jbxx_outhoursdata: [],
          tab_ckzmx_loading: false,
          tab_wzjg_loading: false,
          tab_wzjg_data: [],
          tab_ybzh_loading: false,
          tab_showflag: "tabname_jbxx",
          jbxx_rptitemcode_readonly: false,
          jbxx_seq_readonly: true,
          jbxx_reftext_dialogflag: false,
          jbxx_outhours_dialogflag: false,
          jbxx_limitrules_dialogflag: false,
          jbxx_limitrules_dialogflag_hours: "",
          jbxx_limitrules_dialogflag_change: "",
          jbxx_limitrules_dialogflag_cg: "",
          jbxx_limitrules_dialogflag_percent: "",
          jbxx_iscalc_dialogflag: false,
          jbxx_iscalc_loading: false,
          jbxx_iscalc_data: [],
          jbxx_iscalc_dataLog: [],
          jbxx_iscalc_seach: "",
          jbxx_iscalc_specimen_dialogflag: false,
          jbxx_iscalc_dept_dialogflag: false,
          jbxx_iscalc_ward_dialogflag: false,
          jbxx_iscalc_hospital_dialogflag: false,
          jbxx_s_calc_formula: "",
          jbxx_s_calc_formulatext: "",
          jbxx_iscalcGuide_dialog: false, //常用公式向导
          CalcTestKey: 0,
          CalcTestValue: 0,
          calcGuide_calcformula: "",
          calcguide: {},
          dialogrptitem: false, //常用公式报告项目开窗
          jbxx_externalcode_tableData: [], //界面展示数据
          jbxx_externalcode_tableDataLog: [], //AJAX真实获取数据
          jbxx_externalcode_seach: "", //外部代码查询条件
          jbxx_dialogTable_externalcode: false, //外部代码弹出框控制标志
          jbxx_externalcode_flag: "", //打开外部代码弹出框 记录外部代码 1/2/3

          tab_jbxx_button: "inline",
          tab_wzjg_button: "none",
          tab_lcyy_button: "none",

          tab_jbxx_outhours_validRules: {
              req_deptno: [{ required: true, message: "必须填写" }],
              alertouthours: [{ required: true, message: "必须填写" }],
          },

          tab_wzjg_validRules: {
              textvalue: [{ required: true, message: "必须填写文字结果" }],
          },
          tab_ckzmx_bysex_if: false,
          tab_ckzmx_byage_if: false,
          tab_ckzmx_byspecimen_if: false,
          tab_ckzmx_byphysicycle_if: false,
          tab_ckzmx_bydiag_if: false,
          tab_syqk_data_rptunitid: "",
          tab_unitList: [],
          tab_label: "基本信息",
          tab_czjc_loading: false,
          tab_czjc_data: [],
          tab_czjc_validRules: {
              rpt_itemcode: [{ required: true, message: "必须填写报告项目代码" }],
              seq: [{ required: true, message: "必须填写序号" }],
              lastdays_min: [{ required: true, message: "必须填写结果相差天数1" }],
              lastdays_max: [{ required: true, message: "必须填写结果相差天数2" }],
              result_min: [{ required: true, message: "必须填写结果段起始值" }],
              result_max: [{ required: true, message: "必须填写结果段结束值" }],
              specimen_code: [{ required: true, message: "必须填写标本类型" }],
              req_deptno: [{ required: true, message: "必须填写申请科室" }],
              pat_typecode: [{ required: true, message: "必须填写病人类型" }],
              diff_sign: [{ required: true, message: "必须填写" }],
              diff_abs: [{ required: true, message: "必须填写变动绝对值" }],
              diff_per: [{ required: true, message: "必须填写变动百分比" }],
              autochk_use: [{ required: true, message: "必须填写" }],
              manualchk_use: [{ required: true, message: "必须填写" }],
          },
          pageinitloading: false,
          ModData: [],
          AddData: [],
          selrow: [],
          ExportEventDiv: false,
          exportid: "",
          ResSql: "",
          msgList: [
              { msg: "1.导出Excel文件（当前列表项目15列信息，可导入）", value: "1" },
              { msg: "2.导出列表信息", value: "2" },
              { msg: "3.导出Xml文件（当前列表项目所有信息）", value: "3" },
              { msg: "4.dat文件（当前数据库所有项目所有信息）", value: "4" },
          ],
          keyConfig: {
              isDel: true,
              isTab: true,
              isEdit: true,
              isArrow: true,
          },
          physicycleOption: [],
          specimenOption: [],
          reskey: 0,
          jbxx_ref_text: "",
          main_dialogkey: 0,
          savenotclosedialog: "0",
          headtitle: "",
          dialogResult: false,
          resultData: [],
          result_text: "",
          resultflag: "1",
          tab_pcxmrow: [],
          Lab_CalcGuideData: [], //常用计算公式
          Lab_CalcGuideloading: false,
          Lab_CalcItemData: [],
          Lab_CalcrptItemData: [], //报告项目
          Lab_CalcrptItemLoading: false,
          calcGuideRptitemRow: {},
          verifyStr: "",
          diagicdOption: [],
          dialogdiagicd: false,
          diag_icdRow: {},
          chk_isgermgroup: 0,
          disabledKindGroup: true,
          refvaljoinchar: "--",
          externalcode1alias: "外部代码1",
          externalcode2alias: "外部代码2",
          externalcode3alias: "外部代码3",
          externalcode4alias: "外部代码4",
          externalcode5alias: "外部代码5",

          importRptitemDialog: false,
          importrptmodelList: [
              { name: "1、导入Excel，用于补充项目", value: "1" },
              { name: "2、导入细菌字典用于补充和智能匹配", value: "2" },
              { name: "3、导入dat文件替换当前所有项目", value: "3" },
          ],
          keyLocalConfig: {
              isArrow: true,
          },
          exeimportRptDialog: false,
          exeimportMatchRptDialog: false,
          fimportrptList: [],
          importrptList: [],
          importMatchrptList: [],
          MatchrptList: [],
          form: {},
          showFile: false,
          url: "",
          updata: { action: "LIS110-excel" },
          upmatchdata: { action: "LIS110-excelmatch" },
          importNumtext: "",
          CHNMatchCoverEN: "1",
          ENMatchCoverCHN: "1",
          import_itemclasscode: "",
          import_instrclass: "",
          showonlyupdate: "0",
          isoverride: 0,
          uploadpassword: "", //项目导入口令
          uploadpasswordVisible: false, //项目导入口令确认弹窗
          limitNum: 1,
          formLabelWidth: "100px",
          fileimportform: {
              file: "",
          },
          fileList: [],
          fileimportnotifyVisible: false,
      };
  },
  created() {
      this.getButtonWidth();
      this.MainTable_Rfresh();
      this.rexternalcode_refresh();
      this.getUnitList();
      this.$ddldata.IsAreaModeFun().then((r) => {}); //防止刷新页面导致IsAreaMode被清掉
  },
  mounted() {},
  destroyed() {},
  updated() {
      this.getButtonWidth();
  },
  methods: {
      getButtonWidth() {
          if (this.$refs.buttondiv) {
              this.buttonwidth = this.$refs.buttondiv.parentElement.parentElement.parentElement.parentElement.offsetWidth - 200 + "px";
          }
      }, //下拉数据初始化
      getUnitList() {
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_getUnit",
                  },
              })
              .then((res) => {
                  this.tab_unitList = res.list1;
                  this.physicycleOption = res.list2;
                  this.specimenOption = res.list3;
                  this.diagicdOption = res.list4;
                  if (res.refvaljoinchar != "") this.refvaljoinchar = res.refvaljoinchar;
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      //主表查询
      async MainTable_Rfresh() {
          this.MainLoading = true;
          try {
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_query",
                      search_gram: this.search_gram,
                      seach_germkind: this.seach_germkind,
                      germflag: this.seach_germflag,
                      seach_germgroup: this.seach_germgroup,
                      keystr: this.seach_keystr,
                      chk_isgermgroup: this.chk_isgermgroup,
                  },
              });
              this.MainTableData = res.RData.Data;
              this.tableColumn = res.RData.Cols;
              this.ResSql = res.ResSql;
              if (res.RData.Data.length > 0) {
                  this.$refs.Main_Table.setCurrentRow(res.RData.Data[0]);
                  this.MainTable_GetDataInfo(res.RData.Data[0].rpt_itemcode);
                  if (this.tab_label == "基本信息") {
                      this.tab_jbxx_button = "inline";
                  } else if (this.tab_label == "文字结果") {
                      this.tab_wzjg_button = "inline";
                      this.tab_wzjg_getData();
                  } else if (this.tab_label == "临床意义") {
                      this.tab_lcyy_button = "inline";
                      this.MainTable_GetDataInfo(res.RData.Data[0].rpt_itemcode);
                  }
              } else {
                  await this.clearjbxx();
              }
              console.log(res.aliaslist);
              if (res.aliaslist.length > 0) {
                  if (res.aliaslist[0] != "") this.externalcode1alias = res.aliaslist[0];
                  if (res.aliaslist[1] != "") this.externalcode2alias = res.aliaslist[1];
                  if (res.aliaslist[2] != "") this.externalcode3alias = res.aliaslist[2];
                  if (res.aliaslist[3] != "") this.externalcode4alias = res.aliaslist[3];
                  if (res.aliaslist[4] != "") this.externalcode5alias = res.aliaslist[4];
              }
              this.MainLoading = false;
          } catch (e) {
              this.$message.error(e);
              this.MainLoading = false;
          }
      },
      async clearjbxx() {
          this.Tab_jbxx_Data = {};
          this.tab_wzjg_data = [];
      },
      //获取行数据
      async MainTableChange_Event({ row, rowIndex, column, columnIndex }, event) {
          this.Tab_jbxx_Data.rpt_itemcode = row.rpt_itemcode;
          this.selrow = row;
          if (this.tab_label == "基本信息") {
              this.tab_jbxx_button = "inline";
              await this.MainTable_GetDataInfo(row.rpt_itemcode);
          }
          if (this.tab_label == "文字结果") {
              this.tab_wzjg_button = "inline";
              await this.tab_wzjg_getData();
          }
          if (this.tab_label == "临床意义") {
              this.tab_lcyy_button = "inline";
              await this.MainTable_GetDataInfo(row.rpt_itemcode);
          }
      },
      //tab页面
      async tab_getdata(tab, event) {
          await this.init_tabbutton();
          this.tab_label = tab.label;
          if (tab.label == "基本信息") {
              this.tab_jbxx_button = "inline";
              await this.MainTable_GetDataInfo(this.Tab_jbxx_Data.rpt_itemcode);
          }

          if (tab.label == "文字结果") {
              this.tab_wzjg_button = "inline";
              await this.tab_wzjg_getData();
          }
          if (tab.label == "临床意义") {
              this.tab_lcyy_button = "inline";
              await this.MainTable_GetDataInfo(this.Tab_jbxx_Data.rpt_itemcode);
          }
      },
      rptitemclassChange(code, name) {
          this.search_gram = code;
          this.MainTable_Rfresh();
      },
      rptunitChange(code, name) {
          this.seach_germkind = code;
          this.search_rptunitname = name;
          this.MainTable_Rfresh();
      },
      germflagChange(code, name) {
          this.seach_germflag = code;
          this.MainTable_Rfresh();
      },
      instrclassChange(code, name) {
          this.seach_germgroup = code;
          this.MainTable_Rfresh();
      }, //返回基本信息
      async MainTable_GetDataInfo(rpt_itemcode) {
          if (!rpt_itemcode) {
              return false;
          }
          this.pageinitloading = true;
          if (this.tab_label == "基本信息") {
              this.tab_showflag = "tabname_jbxx";
              this.tab_jbxx_button = "inline";
          }
          if (this.tab_label == "临床意义") {
              this.tab_showflag = "tabname_lcyy";
              this.tab_lcyy_button = "inline";
          }
          try {
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_query_byitemcode",
                      rpt_itemcode: rpt_itemcode,
                  },
              });
              res.Data[0].ref_byage = res.Data[0].ref_byage == "1" ? true : false;
              res.Data[0].ref_bysex = res.Data[0].ref_bysex == "1" ? true : false;
              res.Data[0].ref_byspecimen = res.Data[0].ref_byspecimen == "1" ? true : false;
              res.Data[0].iscalc = res.Data[0].iscalc == "1" ? true : false;
              res.Data[0].isgermgroup = res.Data[0].isgermgroup == "1" ? true : false;
              res.Data[0].mustmatchlast = res.Data[0].mustmatchlast == "1" ? true : false;
              res.Data[0].mustmatchlastflag = res.Data[0].mustmatchlastflag == "1" ? true : false;
              res.Data[0].autoalert = res.Data[0].autoalert == "1" ? true : false;
              res.Data[0].autochkflag = res.Data[0].autochkflag == "1" ? true : false;
              res.Data[0].autochk_txtresult = res.Data[0].autochk_txtresult == "1" ? true : false;
              res.Data[0].autochk_qtlt = res.Data[0].autochk_qtlt == "1" ? true : false;
              res.Data[0].stopflag = res.Data[0].stopflag == "1" ? true : false;
              res.Data[0].nostat = res.Data[0].nostat == "1" ? true : false;
              res.Data[0].resulttwice = res.Data[0].resulttwice == "1" ? true : false;
              res.Data[0].sameflagautochkok = res.Data[0].sameflagautochkok == "1" ? true : false;
              this.Tab_jbxx_Data = res.Data[0];

              if (this.Tab_jbxx_Data.ref_bysex != "1") {
                  this.tab_ckzmx_bysex_if = false;
              } else {
                  this.tab_ckzmx_bysex_if = true;
              }
              if (this.Tab_jbxx_Data.ref_byage != "1") {
                  this.tab_ckzmx_byage_if = false;
              } else {
                  this.tab_ckzmx_byage_if = true;
              }
              if (this.Tab_jbxx_Data.ref_byspecimen != "1") {
                  this.tab_ckzmx_byspecimen_if = false;
              } else {
                  this.tab_ckzmx_byspecimen_if = true;
              }
              if (this.Tab_jbxx_Data.ref_byphysicycle != "1") {
                  this.tab_ckzmx_byphysicycle_if = false;
              } else {
                  this.tab_ckzmx_byphysicycle_if = true;
              }
              if (this.Tab_jbxx_Data.ref_bydiag != "1") {
                  this.tab_ckzmx_bydiag_if = false;
              } else {
                  this.tab_ckzmx_bydiag_if = true;
              }
              //判断是不是菌属控制一级分类和二级分类是不是可以选择
              if (this.Tab_jbxx_Data.isgermgroup != "1") {
                  this.disabledKindGroup = true;
              } else {
                  this.disabledKindGroup = false;
              }

              if (!this.Tab_jbxx_Data.externalcode1_name) {
                  this.Tab_jbxx_Data.externalcode1_name = this.Tab_jbxx_Data.externalcode1;
              } else {
                  this.Tab_jbxx_Data.externalcode1_name = this.Tab_jbxx_Data.externalcode1_name + "(" + this.Tab_jbxx_Data.externalcode1 + ")";
              }
              if (!this.Tab_jbxx_Data.externalcode2_name) {
                  this.Tab_jbxx_Data.externalcode2_name = this.Tab_jbxx_Data.externalcode2;
              } else {
                  this.Tab_jbxx_Data.externalcode2_name = this.Tab_jbxx_Data.externalcode2_name + "(" + this.Tab_jbxx_Data.externalcode2 + ")";
              }
              if (!this.Tab_jbxx_Data.externalcode3_name) {
                  this.Tab_jbxx_Data.externalcode3_name = this.Tab_jbxx_Data.externalcode3;
              } else {
                  this.Tab_jbxx_Data.externalcode3_name = this.Tab_jbxx_Data.externalcode3_name + "(" + this.Tab_jbxx_Data.externalcode3 + ")";
              }
              if (!this.Tab_jbxx_Data.externalcode4_name) {
                  this.Tab_jbxx_Data.externalcode4_name = this.Tab_jbxx_Data.externalcode4;
              } else {
                  this.Tab_jbxx_Data.externalcode4_name = this.Tab_jbxx_Data.externalcode4_name + "(" + this.Tab_jbxx_Data.externalcode4 + ")";
              }
              if (!this.Tab_jbxx_Data.externalcode5_name) {
                  this.Tab_jbxx_Data.externalcode5_name = this.Tab_jbxx_Data.externalcode5;
              } else {
                  this.Tab_jbxx_Data.externalcode5_name = this.Tab_jbxx_Data.externalcode5_name + "(" + this.Tab_jbxx_Data.externalcode5 + ")";
              }
              console.log("this.Tab_jbxx_Data", this.Tab_jbxx_Data);
              this.pageinitloading = false;
          } catch (e) {
              this.$message.error(e);
          }
      },
      //externalcode_refresh 数据获取/刷新方法
      rexternalcode_refresh() {
          this.$tool
              .request({
                  url: "LIS/LIS1/LIS113",
                  method: "post",
                  data: {
                      action: "get_externalmode",
                  },
              })
              .then((res) => {
                  this.jbxx_externalcode_tableDataLog = res.Data;
                  this.jbxx_externalcode_tableData = res.Data[0];
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      //获取拼音码
      getInputCode(event) {
          let rowinputcode = "";
          let getpinyin = this.$pinyin(event, {
              style: this.$pinyin.STYLE_FIRST_LETTER, // 首字母
              heteronym: true,
          });
          for (var i = 0; i < getpinyin.length; i++) {
              var curchar = getpinyin[i];
              if (curchar.length > 1) {
                  rowinputcode += curchar[0];
              } else {
                  rowinputcode += curchar;
              }
          }
          this.Tab_jbxx_Data_dialog.inputcode = rowinputcode.toUpperCase();
      },
      //弹出外部代码框
      jbxx_open_externalcodeDialog(flag) {
          this.jbxx_dialogTable_externalcode = true;
          this.jbxx_externalcode_seach = "";
          this.jbxx_externalcode_flag = flag;
          this.jbxx_externalcode_tableData.splice(0, this.jbxx_externalcode_tableData.length);
          if (flag === "e1") {
              this.jbxx_externalcode_tableData = JSON.parse(JSON.stringify(this.jbxx_externalcode_tableDataLog[0]));
          }
          if (flag === "e2") {
              this.jbxx_externalcode_tableData = JSON.parse(JSON.stringify(this.jbxx_externalcode_tableDataLog[1]));
          }
          if (flag === "e3") {
              this.jbxx_externalcode_tableData = JSON.parse(JSON.stringify(this.jbxx_externalcode_tableDataLog[2]));
          }
          if (flag === "e4") {
              this.jbxx_externalcode_tableData = JSON.parse(JSON.stringify(this.jbxx_externalcode_tableDataLog[3]));
          }
          if (flag === "e5") {
              this.jbxx_externalcode_tableData = JSON.parse(JSON.stringify(this.jbxx_externalcode_tableDataLog[4]));
          }
      },
      //外部代码 双击选择 赋值事件
      jbxx_externalcode_dbclick(evt) {
          if (this.jbxx_externalcode_flag === "e1") {
              //externalcode1
              this.Tab_jbxx_Data_dialog.externalcode1 = evt.row.rptitemcode;
              this.Tab_jbxx_Data_dialog.externalcode1_name = evt.row.rptitemname;
          }
          if (this.jbxx_externalcode_flag === "e2") {
              //externalcode2
              this.Tab_jbxx_Data_dialog.externalcode2 = evt.row.rptitemcode;
              this.Tab_jbxx_Data_dialog.externalcode2_name = evt.row.rptitemname;
          }
          if (this.jbxx_externalcode_flag === "e3") {
              //externalcode3
              this.Tab_jbxx_Data_dialog.externalcode3 = evt.row.rptitemcode;
              this.Tab_jbxx_Data_dialog.externalcode3_name = evt.row.rptitemname;
          }
          if (this.jbxx_externalcode_flag === "e4") {
              //externalcode4
              this.Tab_jbxx_Data_dialog.externalcode4 = evt.row.rptitemcode;
              this.Tab_jbxx_Data_dialog.externalcode4_name = evt.row.rptitemname;
          }
          if (this.jbxx_externalcode_flag === "e5") {
              //externalcode5
              this.Tab_jbxx_Data_dialog.externalcode5 = evt.row.rptitemcode;
              this.Tab_jbxx_Data_dialog.externalcode5_name = evt.row.rptitemname;
          }
          this.jbxx_dialogTable_externalcode = false;
      },
      jbxx_externalcode_tableData_close() {
          this.jbxx_externalcode_seach = "";
          this.jbxx_externalcode_flag = "";
      },
      //jbxx_externalcode_seach 前端查询
      jbxx_externalcode_seachEvent() {
          let seachstr = this.jbxx_externalcode_seach;
          this.jbxx_externalcode_tableData.splice(0, this.jbxx_externalcode_tableData.length);
          //清空数组
          if (this.jbxx_externalcode_flag === "e1") {
              for (let i = 0; i < this.jbxx_externalcode_tableDataLog[0].length; i++) {
                  if (this.jbxx_externalcode_tableDataLog[0][i].rptitemcode.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[0][i].rptitemname.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[0][i].inputcode.indexOf(seachstr) >= 0) {
                      this.jbxx_externalcode_tableData.push(this.jbxx_externalcode_tableDataLog[0][i]);
                  }
              }
          }
          if (this.jbxx_externalcode_flag === "e2") {
              for (let i = 0; i < this.jbxx_externalcode_tableDataLog[1].length; i++) {
                  if (this.jbxx_externalcode_tableDataLog[1][i].rptitemcode.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[1][i].rptitemname.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[1][i].inputcode.indexOf(seachstr) >= 0) {
                      this.jbxx_externalcode_tableData.push(this.jbxx_externalcode_tableDataLog[1][i]);
                  }
              }
          }
          if (this.jbxx_externalcode_flag === "e3") {
              for (let i = 0; i < this.jbxx_externalcode_tableDataLog[2].length; i++) {
                  if (this.jbxx_externalcode_tableDataLog[2][i].rptitemcode.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[2][i].rptitemname.indexOf(seachstr) >= 0 || this.jbxx_externalcode_tableDataLog[2][i].inputcode.indexOf(seachstr) >= 0) {
                      this.jbxx_externalcode_tableData.push(this.jbxx_externalcode_tableDataLog[2][i]);
                  }
              }
          }
      }, //新增时判断项目代码是否重复
      jbxx_rptitemcode_change() {
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "validation_rptitemcode",
                      rpt_itemcode: this.Tab_jbxx_Data_dialog.rpt_itemcode,
                  },
              })
              .then((res) => {
                  if (res == "-1") {
                      this.$alert("项目代码：" + this.Tab_jbxx_Data_dialog.rpt_itemcode + "重复，请检查重复的项目代码对应的项目归类是否正确或填写新的项目代码！", "提示");
                      this.Tab_jbxx_Data_dialog.rpt_itemcode = "";
                  }
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      }, //弹窗参考值改变
      jbxx_ref_change() {
          if (!!this.Tab_jbxx_Data_dialog.ref_l && !!this.Tab_jbxx_Data_dialog.ref_h) {
              //this.Tab_jbxx_Data_dialog.ref_text = this.Tab_jbxx_Data_dialog.ref_l + "--" + this.Tab_jbxx_Data_dialog.ref_h;
              this.Tab_jbxx_Data_dialog.ref_text = this.Tab_jbxx_Data_dialog.ref_l + this.refvaljoinchar + this.Tab_jbxx_Data_dialog.ref_h;
          } else {
              if (this.Tab_jbxx_Data_dialog.ref_l != "" && !this.Tab_jbxx_Data_dialog.ref_h) {
                  this.Tab_jbxx_Data_dialog.ref_text = "≥" + this.Tab_jbxx_Data_dialog.ref_l;
              }
              if (!this.Tab_jbxx_Data_dialog.ref_l && this.Tab_jbxx_Data_dialog.ref_h != "") {
                  this.Tab_jbxx_Data_dialog.ref_text = "≤" + this.Tab_jbxx_Data_dialog.ref_h;
              }
          }
      },
      //高值低值
      // ckzmx_keydownEvent({ row }) {
      //     setTimeout(() => {
      //         if (row.ref_l != "" && row.ref_h != "") {
      //             row.ref_text = parseFloat(row.ref_l) + "--" + parseFloat(row.ref_h);
      //         } else {
      //             if (row.ref_l != "" && row.ref_h == "") {
      //                 row.ref_text = "≥" + parseFloat(row.ref_l);
      //             }
      //             if (row.ref_l == "" && row.ref_h != "") {
      //                 row.ref_text = "≤" + parseFloat(row.ref_h);
      //             }
      //         }
      //     }, 200);
      // },
      tab_jbxx_addEvent() {
          this.Tab_jbxx_Data_dialog = { hospcode: "ALL", germflag: "2", resulttype: "4", textresultflag: "M", seq: "0", dec_digits: "-1", inputcode: "", ref_l: "", ref_h: "", ref_text: "", rpt_itemcode: "", rptcode: "" };
          this.jbxx_rptitemcode_readonly = false;
          this.tab_ckzmx_bysex_if = false;
          this.tab_ckzmx_byage_if = false;
          this.tab_ckzmx_byspecimen_if = false;
          this.tab_ckzmx_byphysicycle_if = false;
          this.main_dialog_name = "新增";
          this.main_dialogkey++;
          this.main_dialogflag = true;
          this.disabledKindGroup = true; //判断一级分类和二级分类是不是可以维护
          this.Tab_jbxx_Data_dialog.itemclasscode = this.search_gram;
          this.anchor = "anchor-0";
      },
      tab_jbxx_editEvent() {
          if (!this.Tab_jbxx_Data.rpt_itemcode) {
              this.$message.error("请选择修改的数据！");
              return false;
          }
          this.jbxx_rptitemcode_readonly = true;
          this.Tab_jbxx_Data_dialog = XE.clone(this.Tab_jbxx_Data, true);
          this.main_dialog_name = "编辑";
          this.main_dialogflag = true;
      },
      async main_dialog_saveEvent() {
          //转换checkbox
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.itemclasscode) || this.Tab_jbxx_Data_dialog.itemclasscode == "") {
              this.$message.error("项目归类不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.rpt_itemcode) || this.Tab_jbxx_Data_dialog.rpt_itemcode == "") {
              this.$message.error("项目代码不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.rpt_itemname) || this.Tab_jbxx_Data_dialog.rpt_itemname == "") {
              this.$message.error("中文名称不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.germflag) || this.Tab_jbxx_Data_dialog.germflag == "") {
              this.$message.error("项目类型不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.itemcode_en) || this.Tab_jbxx_Data_dialog.itemcode_en == "") {
              this.$message.error("英文缩写不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.resulttype) || this.Tab_jbxx_Data_dialog.resulttype == "") {
              this.$message.error("结果类型不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.textresultflag) || this.Tab_jbxx_Data_dialog.textresultflag == "") {
              this.$message.error("默认文字结果标志不可为空！");
              return false;
          }
          if (XE.isUndefined(this.Tab_jbxx_Data_dialog.rptcode) || this.Tab_jbxx_Data_dialog.rptcode == "") {
              this.$message.error("报告代码不可为空！");
              return false;
          }

          let gData = XE.clone(this.Tab_jbxx_Data_dialog);
          gData.nostat = this.Tab_jbxx_Data_dialog.nostat ? "1" : "0";
          gData.stopflag = this.Tab_jbxx_Data_dialog.stopflag ? "1" : "0";
          gData.resulttwice = this.Tab_jbxx_Data_dialog.resulttwice ? "1" : "0";
          gData.isgermgroup = this.Tab_jbxx_Data_dialog.isgermgroup ? "1" : "0";
          gData.ref_bysex = this.Tab_jbxx_Data_dialog.ref_bysex ? "1" : "0";
          gData.ref_byage = this.Tab_jbxx_Data_dialog.ref_byage ? "1" : "0";
          gData.ref_byspecimen = this.Tab_jbxx_Data_dialog.ref_byspecimen ? "1" : "0";
          gData.autochkflag = this.Tab_jbxx_Data_dialog.autochkflag ? "1" : "0";
          gData.sameflagautochkok = this.Tab_jbxx_Data_dialog.sameflagautochkok ? "1" : "0";
          gData.autochk_txtresult = this.Tab_jbxx_Data_dialog.autochk_txtresult ? "1" : "0";
          gData.autochk_qtlt = this.Tab_jbxx_Data_dialog.autochk_qtlt ? "1" : "0";
          gData.mustmatchlastflag = this.Tab_jbxx_Data_dialog.mustmatchlastflag ? "1" : "0";
          gData.mustmatchlast = this.Tab_jbxx_Data_dialog.mustmatchlast ? "1" : "0";
          gData.autoalert = this.Tab_jbxx_Data_dialog.autoalert ? "1" : "0";
          gData.iscalc = this.Tab_jbxx_Data_dialog.iscalc ? "1" : "0";
          try {
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_addedit",
                      data: gData,
                      actionindex: this.main_dialog_name,
                  },
              });
              if (res.errcode == "1") {
                  this.$message.success("保存成功！");
                  if (this.$ddldata.IsAreaMode) {
                      //区域LIS模式下还要保存默认参考值明细和文字结果，非区域LIS模式下只需要保存项目
                      this.SaveLab_RptItemRef(res.keyid);
                  }
                  //保存后是否关闭弹窗
                  if (this.savenotclosedialog == "1") {
                      this.tab_jbxx_addEvent();
                      // this.main_dialogflag = true;
                  } else {
                      this.main_dialogflag = false;
                      this.jbxx_iscalc_dataLog = [];
                  }

                  if (this.main_dialog_name == "新增") {
                      //新增数据成功后的不刷新操作
                      if (this.AddData.indexOf(res.keyid) < 0) {
                          this.AddData.push(res.keyid);
                      }
                      this.$refs.Main_Table.insertAt(res.obj[0], -1).then(({ row }) => {
                          this.$refs.Main_Table.scrollToRow(row);
                          this.$refs.Main_Table.setCurrentRow(row);
                          this.selrow = row;
                      });
                  } else if (this.main_dialog_name == "编辑") {
                      this.setvalueToTable(res.obj[0]).then((row) => {
                          setTimeout(() => {
                              this.$refs.Main_Table.setCurrentRow(row);
                          }, 20);
                      });
                      if (this.ModData.indexOf(res.keyid) < 0) {
                          this.ModData.push(res.keyid);
                      }
                  }
                  await this.MainTable_GetDataInfo(res.keyid);
              } else {
                  this.Tab_jbxx_Data_dialog = XE.clone(this.Tab_jbxx_Data, true);
                  this.$message.error(res.obj);
              }
          } catch (e) {
              this.$message.warning(e);
          }
      },
      setvalueToTable(obj) {
          let apromise = new Promise((resolove) => {
              this.$nextTick(() => {
                  this.selrow.itemclasscode = obj.itemclasscode;
                  this.selrow.itemclassname = obj.itemclassname;
                  this.selrow.itemcode_en = obj.itemcode_en;
                  this.selrow.rpt_itemname = obj.rpt_itemname;
                  this.selrow.rpt_itemcode = obj.rpt_itemcode;
                  this.selrow.ref_text = obj.ref_text;
                  this.selrow.unit = obj.unit;
                  this.selrow.rptcode = obj.rptcode;
                  this.selrow.iscalc = obj.iscalc;
                  this.selrow.calc_formulatext = obj.calc_formulatext;
                  this.selrow.resulttype = obj.resulttype;
                  this.selrow.resulttype_name = obj.resulttype_name;
                  this.selrow.dec_digits = obj.dec_digits;
                  this.selrow.dec_digits_name = obj.dec_digits_name;
                  this.selrow.instrclass = obj.instrclass;
                  this.selrow.germflag = obj.germflag;
                  this.selrow.germflag_name = obj.germflag_name;
                  this.selrow.mutex_no = obj.mutex_no;
                  this.selrow.transpecimen_no = obj.transpecimen_no;
                  this.selrow.itemname_en = obj.itemname_en;
                  this.selrow.textresultflag = obj.textresultflag;
                  this.selrow.textresultflag_name = obj.textresultflag_name;
                  this.selrow.ref_bysex = obj.ref_bysex;
                  this.selrow.ref_byage = obj.ref_byage;
                  this.selrow.ref_byspecimen = obj.ref_byspecimen;
                  this.selrow.ref_l = obj.ref_l;
                  this.selrow.ref_h = obj.ref_h;
                  this.selrow.redo_l = obj.redo_l;
                  this.selrow.redo_h = obj.redo_h;
                  this.selrow.autoalert = obj.autoalert;
                  this.selrow.price = obj.price;
                  this.selrow.inputcode = obj.inputcode;
                  this.selrow.externalcode1 = obj.externalcode1;
                  if (!obj.externalcode1_name) {
                      this.selrow.externalcode1_name = obj.externalcode1;
                  } else {
                      this.selrow.externalcode1_name = obj.externalcode1_name;
                  }
                  this.selrow.externalcode2 = obj.externalcode2;
                  if (!obj.externalcode2_name) {
                      this.selrow.externalcode2_name = obj.externalcode2;
                  } else {
                      this.selrow.externalcode2_name = obj.externalcode2_name;
                  }
                  this.selrow.externalcode3 = obj.externalcode3;
                  if (!obj.externalcode3_name) {
                      this.selrow.externalcode3_name = obj.externalcode3;
                  } else {
                      this.selrow.externalcode3_name = obj.externalcode3_name;
                  }
                  this.selrow.externalcode4 = obj.externalcode4;
                  if (!obj.externalcode4_name) {
                      this.selrow.externalcode4_name = obj.externalcode4;
                  } else {
                      this.selrow.externalcode4_name = obj.externalcode4_name;
                  }
                  this.selrow.externalcode5 = obj.externalcode5;
                  if (!obj.externalcode5_name) {
                      this.selrow.externalcode5_name = obj.externalcode5;
                  } else {
                      this.selrow.externalcode5_name = obj.externalcode5_name;
                  }
                  this.selrow.mustmatchlast = obj.mustmatchlast;
                  this.selrow.alertouthours = obj.alertouthours;
                  this.selrow.hospcode = obj.hospcode;
                  this.selrow.stopflag = obj.stopflag;
                  this.selrow.nostat = obj.nostat;
                  this.selrow.basename = obj.basename;
                  this.selrow.chklastdays = obj.chklastdays;
                  this.selrow.chklastratio = obj.chklastratio;
                  this.selrow.chklastabs = obj.chklastabs;
              });
              resolove(this.selrow);
          });
          return apromise;
      },
      async SaveLab_RptItemRef(rpt_itemcodestr) {
          try {
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "SaveLab_RptItemRef",
                      rpt_itemcodestr: rpt_itemcodestr,
                      rptunitid: this.seach_germkind,
                  },
              });
              if (res.errcode != "1") {
                  this.$message.error("区域LIS模式下新增时保存参考值明细和项目文字结果出错" + errmsg);
              }
          } catch (e) {
              this.$message.error("区域LIS模式下新增时保存参考值明细和项目文字结果出错" + e);
          }
      },
      main_dialog_canelEvent() {
          this.main_dialogflag = false;
      },
      tab_jbxx_delete() {
          if (this.Tab_jbxx_Data.rpt_itemcode == "") {
              this.$message.error("请先选择数据！");
              return false;
          }
          this.$confirm("此操作将永久删除该项目, 是否继续?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          })
              .then(() => {
                  var delrow = this.$refs.Main_Table.getCurrentRow();
                  if (delrow) {
                      var alld = this.$refs.Main_Table.getTableData().fullData;
                      var rowindex = alld.indexOf(delrow);
                      this.$refs.Main_Table.remove(delrow);
                      this.confirmDelete(delrow.rpt_itemcode);
                      let havedata = this.$refs.Main_Table.getTableData().fullData;
                      if (havedata.length > 0) {
                          if (rowindex >= havedata.length) rowindex = havedata.length - 1;
                          let selectrow = havedata[rowindex];
                          this.$refs.Main_Table.setCurrentRow(selectrow);
                          this.MainTable_GetDataInfo(selectrow.rpt_itemcode);
                          setTimeout(() => {
                              this.$refs.Main_Table.scrollToRow(selectrow);
                          }, 5);
                      } else {
                          this.MainTable_GetDataInfo("");
                      }
                  }
              })
              .catch(() => {
                  this.$message({
                      type: "info",
                      message: "已取消删除",
                  });
              });
      },
      confirmDelete(rpt_itemcode) {
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_delete",
                      rpt_itemcode: rpt_itemcode,
                  },
              })
              .then((res) => {
                  if (res == "1") {
                      this.$message({
                          message: "删除成功！",
                          type: "success",
                      });
                      //  this.MainTable_Rfresh(nextrptitemcode);
                  } else {
                      this.$message.error("删除失败！");
                  }
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      tab_jbxx_getouthour_event() {
          this.jbxx_outhours_dialogflag = true;
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "get_lab_alertouthoursvsreqdept",
                      rpt_itemcode: this.Tab_jbxx_Data_dialog.rpt_itemcode,
                  },
              })
              .then((res) => {
                  this.tab_jbxx_outhoursdata = res.Data;
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      tab_jbxx_outhours_addEvent() {
          if (this.Tab_jbxx_Data_dialog.rpt_itemcode == "") {
              this.$message.error("请先选择数据！");
              return false;
          }
          let record = {
              rpt_itemcode: this.Tab_jbxx_Data_dialog.rpt_itemcode,
              req_deptno: "",
              alertouthours: "",
          };
          this.$refs.tab_jbxx_outhoursdata_ref.insert(record);
      },
      tab_jbxx_outhours_delEvent() {
          this.$confirm("此操作将删除所选数据, 是否继续?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          })
              .then(() => {
                  this.$refs.tab_jbxx_outhoursdata_ref.removeSelecteds();
              })
              .catch(() => {});
      },
      tab_jbxx_outhours_saveEvent() {
          this.$refs.tab_jbxx_outhoursdata_ref.validate((valid) => {
              if (valid) {
                  let removeRecords = this.$refs.tab_jbxx_outhoursdata_ref.getRemoveRecords();
                  let updateRecords = this.$refs.tab_jbxx_outhoursdata_ref.getUpdateRecords();
                  let insertRecords = this.$refs.tab_jbxx_outhoursdata_ref.getInsertRecords();
                  this.$tool
                      .request({
                          url: "LIS/LIS8/LIS811",
                          method: "post",
                          data: {
                              action: "changeSave_lab_alertouthoursvsreqdept",
                              removeRecords: removeRecords,
                              updateRecords: updateRecords,
                              insertRecords: insertRecords,
                          },
                      })
                      .then((res) => {
                          if (res == "1") {
                              this.$message({
                                  message: "保存成功！",
                                  type: "success",
                              });
                              this.tab_jbxx_getouthour_event();
                          } else {
                              this.$message.error(res);
                          }
                      })
                      .catch((e) => {
                          this.$message.error(e);
                      });
              } else {
                  this.$message.error("您有数据未填写，请填写后再保存！！");
                  return false;
              }
          });
      },
      tab_jbxx_outhours_canelEvent() {
          this.jbxx_outhours_dialogflag = false;
      },
      jbxx_outhours_dialog_editchange(obj) {
          let o_str = obj.old; //修改前字符串
          let n_str = obj.new; //修改后字符串
          let columnName = obj.p.column.property;
          if (columnName == "alertouthours") {
              return this.$tool.onlyNumber(n_str);
          } else {
              return n_str;
          }
      },
      tab_jbxx_limitrule_dbclick() {
          this.jbxx_limitrules_dialogflag = true;
          let limitruleslist = this.Tab_jbxx_Data_dialog.limit_rule.split("|");
          if (limitruleslist.length == 3) {
              if (limitruleslist[0] != "") {
                  this.jbxx_limitrules_dialogflag_hours = limitruleslist[0];
              }
              if (limitruleslist[1] != "") {
                  if (limitruleslist[1].substring(0, 1) == "+") {
                      this.jbxx_limitrules_dialogflag_change = "+";
                      this.jbxx_limitrules_dialogflag_cg = limitruleslist[1].substring(1);
                  } else if (limitruleslist[1].substring(0, 1) == "-") {
                      this.jbxx_limitrules_dialogflag_change = "-";
                      this.jbxx_limitrules_dialogflag_cg = limitruleslist[1].substring(1);
                  } else {
                      this.jbxx_limitrules_dialogflag_change = "";
                      this.jbxx_limitrules_dialogflag_cg = limitruleslist[1];
                  }
              }
              if (limitruleslist[2] != "") {
                  this.jbxx_limitrules_dialogflag_percent = limitruleslist[2];
              }
          } else {
              this.jbxx_limitrules_dialogflag_hours = "";
              this.jbxx_limitrules_dialogflag_change = "";
              this.jbxx_limitrules_dialogflag_cg = "";
              this.jbxx_limitrules_dialogflag_percent = "";
          }
      },
      jbxx_limitrules_dialogflag_cancelevent() {
          this.jbxx_limitrules_dialogflag = false;
          this.jbxx_limitrules_dialogflag_hours = "";
          this.jbxx_limitrules_dialogflag_change = "";
          this.jbxx_limitrules_dialogflag_cg = "";
          this.jbxx_limitrules_dialogflag_percent = "";
      },
      jbxx_limitrules_dialogflag_saveevent() {
          this.Tab_jbxx_Data_dialog.limit_rule = this.jbxx_limitrules_dialogflag_hours + "|" + this.jbxx_limitrules_dialogflag_change + this.jbxx_limitrules_dialogflag_cg + "|" + this.jbxx_limitrules_dialogflag_percent;
          this.jbxx_limitrules_dialogflag = false;
          this.jbxx_limitrules_dialogflag_hours = "";
          this.jbxx_limitrules_dialogflag_change = "";
          this.jbxx_limitrules_dialogflag_cg = "";
          this.jbxx_limitrules_dialogflag_percent = "";
      },
      jbxx_iscalc_click() {
          this.jbxx_s_calc_formula = this.Tab_jbxx_Data_dialog.calc_formula;
          this.jbxx_s_calc_formulatext = this.Tab_jbxx_Data_dialog.calc_formulatext;
          this.jbxx_iscalc_dialogflag = true;
          this.jbxx_iscalc_getdata();
      },
      jbxx_iscalc_getdata() {
          this.jbxx_iscalc_loading = true;
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_query",
                      keystr: this.jbxx_iscalc_seach,
                  },
              })
              .then((res) => {
                  this.jbxx_iscalc_data = res.RData.Data;
                  this.jbxx_iscalc_loading = false;
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      jbxx_iscalc_hospital_change(code, name) {
          var str = " [HOSPITALCODE] = " + '"' + code + '" ';
          if (this.dialogResult) {
              //结果1,2,3
              this.result_iscalc_addevent(str);
          }
          if (this.jbxx_iscalc_dialogflag) {
              //代表计算公式
              this.jbxx_iscalc_addevent(str);
          }
          this.jbxx_iscalc_hospital_dialogflag = false;
      },
      jbxx_iscalc_ward_change(code, name) {
          var str = " [WARDNO] = " + '"' + code + '" ';
          if (this.dialogResult) {
              this.result_iscalc_addevent(str);
          }
          if (this.jbxx_iscalc_dialogflag) {
              this.jbxx_iscalc_addevent(str);
          }

          this.jbxx_iscalc_ward_dialogflag = false;
      },
      jbxx_iscalc_specimen_change(code, name) {
          var str = " [SAMPLE] = " + '"' + code + '" ';
          if (this.dialogResult) {
              this.result_iscalc_addevent(str);
          }
          if (this.jbxx_iscalc_dialogflag) {
              this.jbxx_iscalc_addevent(str);
          }
          this.jbxx_iscalc_specimen_dialogflag = false;
      },
      jbxx_iscalc_dept_change(code, name) {
          var str = " [DEPTNO] = " + '"' + code + '" ';
          if (this.dialogResult) {
              this.result_iscalc_addevent(str);
          }
          if (this.jbxx_iscalc_dialogflag) {
              this.jbxx_iscalc_addevent(str);
          }
          this.jbxx_iscalc_dept_dialogflag = false;
      },
      jbxx_iscalc_data_dbclick({ row, rowIndex }, event) {
          let rpt_itemcode = " [" + row.rpt_itemcode + "] ";
          let temp = row.rpt_itemcode + "$" + row.itemcode_en;
          if (this.jbxx_iscalc_dataLog.indexOf(temp) < 0) {
              this.jbxx_iscalc_dataLog.push(temp);
          }
          this.jbxx_iscalc_addevent(rpt_itemcode);
      },
      jbxx_iscalc_addevent(addstr) {
          if (addstr == "SEX1") {
              addstr = ' [SEX] = "1" ';
          }
          if (addstr == "SEX2") {
              addstr = ' [SEX] = "2" ';
          }
          var elInput = document.getElementById("jbxx_calc_formula_id");
          var startPos = elInput.selectionStart;
          var endPos = elInput.selectionEnd;
          if (startPos === undefined || endPos === undefined) return;
          var txt = elInput.value;
          var result = txt.substring(0, startPos) + addstr + txt.substring(endPos);
          elInput.value = result; // 赋值给input的value
          // 重新定义光标位置
          elInput.focus();
          elInput.selectionStart = startPos + addstr.length;
          elInput.selectionEnd = startPos + addstr.length;
          this.jbxx_s_calc_formula = result;
          this.jbxx_iscalc_formulaToTtext();
      },
      jbxx_iscalc_formula_textchange() {
          this.jbxx_iscalc_formulaToTtext();
      },
      jbxx_iscalc_formulaToTtext() {
          //翻译
          let s_calc_formulatext = "";
          let s_between = "";
          let if_between = false;
          for (let i = 0; i < this.jbxx_s_calc_formula.length; i++) {
              let char = this.jbxx_s_calc_formula.substr(i, 1);
              if (char == "]") {
                  if_between = false;
                  if (s_between != "SEX" && s_between != "AGE" && s_between != "SAMPLE" && s_between != "DEPTNO" && s_between != "WARDNO" && s_between != "HOSPITALCODE") {
                      let if_haven = false;
                      this.jbxx_iscalc_dataLog.forEach((item) => {
                          let element = item.split("$");
                          if (element[0] == s_between) {
                              if_haven = true;
                              s_calc_formulatext += element[1];
                          }
                      });
                      if (!if_haven) {
                          s_calc_formulatext += s_between;
                      }
                  } else {
                      s_calc_formulatext += s_between;
                  }
                  s_between = "";
              }
              if (if_between) {
                  s_between += char;
              } else {
                  s_calc_formulatext += char;
              }
              if (char == "[") {
                  if_between = true;
              }
          }
          this.jbxx_s_calc_formulatext = s_calc_formulatext;
      },
      jbxx_iscalc_dialogclose() {
          this.jbxx_s_calc_formula = "";
          this.jbxx_s_calc_formulatext = "";
          this.jbxx_iscalc_seach = "";
      },
      jbxx_iscalc_dialogflag_cancelevent() {
          this.jbxx_iscalc_dialogflag = false;
      },
      jbxx_iscalc_dialogflag_saveevent() {
          this.Tab_jbxx_Data_dialog.calc_formula = this.jbxx_s_calc_formula;
          this.Tab_jbxx_Data_dialog.calc_formulatext = this.jbxx_s_calc_formulatext;
          this.jbxx_iscalc_dialogflag = false;
      },
      async init_tabbutton() {
          this.tab_jbxx_button = "none";
          this.tab_ckzmx_button = "none";
          this.tab_wzjg_button = "none";
          this.tab_lcyy_button = "none";
          this.tab_ybzh_button = "none";
          this.tab_syqk_button = "none";
          this.tab_pcxm_button = "none";
          this.tab_czjc_button = "none";
      },
      //文字结果
      async tab_wzjg_getData() {
          this.reskey++;
          this.tab_wzjg_loading = true;
          try {
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "get_lab_rptitemval",
                      rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode,
                  },
              });
              if (res.Data.length > 0) {
                  this.tab_wzjg_data = res.Data;
              } else {
                  this.tab_wzjg_data = [];
              }
              this.tab_wzjg_loading = false;
          } catch (e) {
              this.tab_wzjg_loading = false;
              this.$message.error(e);
          }
      },
      tab_wzjg_redoflag(row) {
          if (row.redoflag == "1") {
              row.redoflag = "";
          } else {
              row.redoflag = "1";
          }
      },
      tab_wzjg_addEvent(tvalue, resultf) {
          if (this.Tab_jbxx_Data.rpt_itemcode == "") {
              this.$message.error("请先选择数据！");
              return false;
          }
          let maxseq = 10; //默认10
          let o_seq = 0;
          let n_seq = 0;
          let insertRecords = this.$refs.tab_wzjg_Table.getInsertRecords();
          if (this.tab_wzjg_data.length > 0) {
              //数据库中数据遍历最大SEQ
              o_seq = Number(this.tab_wzjg_data[this.tab_wzjg_data.length - 1].seq);
          }
          if (insertRecords.length > 0) {
              //后添加的数据中遍历最大SEQ
              n_seq = Number(insertRecords[0].seq);
          }
          if (o_seq > n_seq) {
              maxseq += o_seq;
          } else {
              maxseq += n_seq;
          }

          let record = {
              rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode,
              textvalue: tvalue,
              inputcode: "",
              result_flag: resultf,
              redoflag: "0",
              resultkind: "0",
              canautochk: "0",
              containtext: "",
              seq: maxseq,
          };
          this.$refs.tab_wzjg_Table.insert(record);
      },
      tab_wzjg_delete() {
          let removeRecords = this.$refs.tab_wzjg_Table.getSelectRecords();
          if (removeRecords.length <= 0) {
              this.$message.error("请先选择数据！");
              return false;
          }
          this.$confirm("此操作将删除所选数据, 是否继续?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          })
              .then(() => {
                  this.$refs.tab_wzjg_Table.removeSelecteds();
                  this.tab_wzjg_save(); //直接调用删除
              })
              .catch(() => {});
      },
      tab_wzjg_addPN() {
          let insertRecords = this.$refs.tab_wzjg_Table.getInsertRecords();
          let yangX = false;
          let yinX = false;
          let ruoyangX = false;
          //循环数据库数据 判断是否有部分数据
          for (let i = 0; i < this.tab_wzjg_data.length; i++) {
              if (this.tab_wzjg_data[i].textvalue.replace(/\s+/g, "") == "阴性") {
                  yinX = true;
              }
              if (this.tab_wzjg_data[i].textvalue.replace(/\s+/g, "") == "阳性") {
                  yangX = true;
              }
              if (this.tab_wzjg_data[i].textvalue.replace(/\s+/g, "") == "弱阳性") {
                  ruoyangX = true;
              }
          }
          //循环新添加的数据 判断是否有部分数据
          for (let i = 0; i < insertRecords.length; i++) {
              if (insertRecords[i].textvalue.replace(/\s+/g, "") == "阴性") {
                  yinX = true;
              }
              if (insertRecords[i].textvalue.replace(/\s+/g, "") == "阳性") {
                  yangX = true;
              }
              if (insertRecords[i].textvalue.replace(/\s+/g, "") == "弱阳性") {
                  ruoyangX = true;
              }
          }
          if (!yinX) {
              this.tab_wzjg_addEvent("阴性", "N");
          }
          if (!yangX) {
              this.tab_wzjg_addEvent("阳性", "P");
          }
          if (!ruoyangX) {
              this.tab_wzjg_addEvent("弱阳性", "Q");
          }
      },
      tab_wzjg_save() {
          let data = this.$refs.tab_wzjg_Table.tableData;
          let keyArr = [];
          let haveflag = false;
          try {
              data.forEach((item) => {
                  if (keyArr.indexOf(item.textvalue) < 0) {
                      keyArr.push(item.textvalue);
                  } else {
                      haveflag = true;
                      throw ERROR();
                  }
              });
          } catch (e) {}
          if (haveflag) {
              this.$message.error("文字结果不能重复！");
              return false;
          }
          data.sort((a, b) => {
              return a.seq - b.seq;
          });
          this.$refs.tab_wzjg_Table.validate((valid) => {
              if (valid) {
                  let removeRecords = this.$refs.tab_wzjg_Table.getRemoveRecords();
                  let updateRecords = this.$refs.tab_wzjg_Table.getUpdateRecords();
                  let insertRecords = this.$refs.tab_wzjg_Table.getInsertRecords();
                  this.$tool
                      .request({
                          url: "LIS/LIS8/LIS811",
                          method: "post",
                          data: {
                              action: "save_lab_rptitemval",
                              removeRecords: removeRecords,
                              updateRecords: updateRecords,
                              insertRecords: insertRecords,
                          },
                      })
                      .then((res) => {
                          if (res == "1") {
                              this.$message({
                                  message: "保存成功！",
                                  type: "success",
                              });
                              this.tab_wzjg_getData();
                          } else {
                              this.$message.error(res);
                          }
                      })
                      .catch((e) => {
                          this.$message.error(e);
                      });
              } else {
                  this.$message.error("您有数据未填写，请填写后再保存！！");
                  return false;
              }
          });
      }, //文字结果导出
      tab_wzjg_export() {
          //window.open("https://localhost:5002/z/uimg");
          let p = { prgno: "LIS110", pageinfo: "文字结果", rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode };
          this.$pub.commexport(this, p, `文字结果.dat`);
      }, //文字结果导入
      tab_wzjg_import() {
          this.$rm_uploadFiles({
              type: "文件上传",
              prgname: "LIS110",
              param1: this.Tab_jbxx_Data.rpt_itemcode,
              btn: {
                  confirmBtnText: "立即上传",
                  cancelBtnText: "取消",
              },
          })
              .then((res) => {
                  if (res.flag == "1") {
                      this.$notify.success({
                          title: "成功",
                          message: `文件上传成功`,
                      });
                      this.tab_wzjg_getData();
                  } else {
                      this.$notify.error({
                          title: "错误",
                          message: `文件上传失败`,
                      });
                  }
              })
              .catch((e) => {
                  console.log("error", e);
              });
      },
      //临床意义保存
      tab_lcyy_save() {
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "save_lab_rpotitem_lcyy",
                      rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode,
                      clinicsign: this.Tab_jbxx_Data.clinicsign,
                  },
              })
              .then((res) => {
                  if (res == "1") {
                      this.$message({
                          message: "保存成功！",
                          type: "success",
                      });
                  } else {
                      this.$message.error(res);
                  }
              })
              .catch((e) => {
                  this.$message.error(e);
              });
      },
      //"rm-cancel"; //作废
      //"rm-disable"; //禁用
      //"rm-readonly"; //只读
      //"rm-alert"; //警告
      GetRowClassName({ row, rowIndex }) {
          if (row.stopflag == "1") {
              return "rm-disable"; //禁用
          }
          if (this.AddData.indexOf(row.rpt_itemcode) > -1) {
              return "row-new";
          }
          if (this.ModData.indexOf(row.rpt_itemcode) > -1) {
              return "row-modify";
          }
      },
      handleSelect() {},
      querySearch(queryString, cb) {
          var restaurants = this.tab_unitList;
          var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
          // 调用 callback 返回建议列表的数据
          cb(results);
      },
      createFilter(queryString) {
          return (restaurant) => {
              return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
          };
      }, //项目代码自动生成
      async itemclassChange() {
          if (this.main_dialog_name == "新增") {
              try {
                  const res = await this.$tool.request({
                      url: "LIS/LIS8/LIS811",
                      method: "post",
                      data: {
                          action: "AutoRptItemcode",
                          itemclasscode: this.Tab_jbxx_Data_dialog.itemclasscode,
                      },
                  });
                  this.Tab_jbxx_Data_dialog.rpt_itemcode = res.data;
                  this.jbxx_rptitemcode_change();
              } catch (e) {}
          }
      },
      handleClick(tab, evt) {
          this.anchor = tab.name;
      }, //是不是可以去除勾选
      iscancelchk(e, name) {
          if (!e) {
              this.$nextTick(async () => {
                  const res = await this.$tool.request({
                      url: "LIS/LIS8/LIS811",
                      method: "post",
                      data: {
                          action: "iscancelchk",
                          rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode,
                          name: name,
                      },
                  });
                  switch (name) {
                      case "sex":
                          this.Tab_jbxx_Data_dialog.ref_bysex = res.value == "1" ? true : false;
                          break;
                      case "age":
                          this.Tab_jbxx_Data_dialog.ref_byage = res.value == "1" ? true : false;
                          break;
                      case "specimen":
                          this.Tab_jbxx_Data_dialog.ref_byspecimen = res.value == "1" ? true : false;
                          break;
                      case "physicycle":
                          this.Tab_jbxx_Data_dialog.ref_byphysicycle = res.value;
                          break;
                      case "diag":
                          this.Tab_jbxx_Data_dialog.ref_bydiag = res.value;
                          break;
                  }
                  if (res.msg != "") {
                      this.$alert("该条在报告单元" + res.msg + "中有设定的参考值，不可取消勾选！", "提示", {
                          confirmButtonText: "确定",
                          confirmButtonClass: "el-button el-button--default el-button--small",
                      });
                  }
              });
          }
      },
      async English_sm() {
          if (this.Tab_jbxx_Data_dialog.itemcode_en != "" && !this.Tab_jbxx_Data_dialog.itemclasscode) {
              this.$alert("请选择项目归类！", "提示", {
                  confirmButtonText: "确定",
                  callback: (action) => {
                      this.Tab_jbxx_Data_dialog.itemcode_en = "";
                      this.$refs.itemclass.$refs.ddlrptitemclassSelect.focus();
                  },
              });
              return false;
          }
          if (this.Tab_jbxx_Data_dialog.itemclasscode == "." && !!this.Tab_jbxx_Data_dialog.itemclasscode) {
              if (!this.Tab_jbxx_Data_dialog.rpt_itemcode) {
                  this.Tab_jbxx_Data_dialog.rpt_itemcode = this.Tab_jbxx_Data_dialog.itemcode_en;
              }
              if (!this.Tab_jbxx_Data_dialog.rptcode) {
                  this.Tab_jbxx_Data_dialog.rptcode = this.Tab_jbxx_Data_dialog.itemcode_en;
              }
          } else {
              if (!!this.Tab_jbxx_Data_dialog.itemclasscode && !!this.Tab_jbxx_Data_dialog.itemcode_en) {
                  if (!this.Tab_jbxx_Data_dialog.rpt_itemcode) {
                      await this.itemclassChange();
                  }

                  if (!this.Tab_jbxx_Data_dialog.rptcode) {
                      this.Tab_jbxx_Data_dialog.rptcode = this.Tab_jbxx_Data_dialog.itemcode_en;
                  }
              }
          }
      },
      ExportChangeEvent({ row }) {
          this.exportid = row.value;
      },
      tab_jbxx_exportEvent() {
          let p = {};
          if (this.exportid == "4") {
              this.ExportEventDiv = false;
              p = { prgno: "LIS110", pageinfo: "基本信息", style: "dat" };
              this.$pub.commexport(this, p, `细菌字典维护.dat`);
              //window.open(this.$tool.baseUrl.replace(/api/, "z") + "filedownload?action=LIS811&file=报告项目维护&style=dat");
          } else if (this.exportid == "3") {
              p = { prgno: "LIS110", pageinfo: "基本信息", style: "xml", sql: this.ResSql };
              this.$pub.commexport(this, p, `细菌字典维护.xml`);
              // window.open(this.$tool.baseUrl.replace(/api/, "z") + "filedownload?action=LIS811&file=报告项目维护&style=xml&sql=" + this.ResSql + "");
          } else if (this.exportid == "2") {
              let data = this.getExportData("2");
              let book = XLSX.utils.book_new();
              let sheet = XLSX.utils.json_to_sheet(data, { skipHeader: true });
              XLSX.utils.book_append_sheet(book, sheet);
              let wbout = XLSX.write(book, { bookType: "xlsx", bookSST: false, type: "binary" });
              let blob = new Blob([this.toBuffer(wbout)], { type: "application/octet-stream" });
              // 保存导出
              FileSaver.saveAs(blob, "LIS811细菌字典.xlsx");
          } else if (this.exportid == "1") {
              let data = this.getExportData("1");
              let book = XLSX.utils.book_new();
              let sheet = XLSX.utils.json_to_sheet(data, { skipHeader: true });
              XLSX.utils.book_append_sheet(book, sheet);
              let wbout = XLSX.write(book, { bookType: "xlsx", bookSST: false, type: "binary" });
              let blob = new Blob([this.toBuffer(wbout)], { type: "application/octet-stream" });
              // 保存导出
              FileSaver.saveAs(blob, "LIS811细菌字典.xlsx");
          } else {
              this.$message.error("请选择要导出的样式！");
          }
      },
      getExportData(index) {
          let code = ["rpt_itemcode", "rpt_itemname", "germflag", "itemclasscode", "instrclass", "itemcode_en", "itemname_en", "resulttype", "textresultflag", "unit", "dec_digits", "rptcode", "ref_l", "ref_h", "ref_text"];
          let datas = this.MainTableData;
          let columns = [];
          if (index == "1") {
              columns = this.tableColumn.filter((item) => code.indexOf(item.field) > -1);
          } else {
              columns = this.tableColumn.filter((item) => item.field);
          }
          let headers = [columns.map((item) => item.title)];
          return headers.concat(
              datas.map((row) => {
                  return columns.map((column) => {
                      return row[column.field];
                  });
              })
          );
      },
      toBuffer(wbout) {
          let buf = new ArrayBuffer(wbout.length);
          let view = new Uint8Array(buf);
          for (let index = 0; index !== wbout.length; ++index) view[index] = wbout.charCodeAt(index) & 0xff;
          return buf;
      },
      jbxx_reftextFun(refval) {
          this.jbxx_ref_text = "";
          let k = "";
          if (refval) {
              k = refval.split("|");
              this.jbxx_ref_text = k.join("\n");
          }
          this.jbxx_reftext_dialogflag = true;
      },
      jbxx_reftext_saveevent() {
          let temp = this.jbxx_ref_text.split("\n");
          if (temp.length > 0) {
              temp = temp.filter((item) => item);
              this.Tab_jbxx_Data_dialog.ref_text = temp.join("|");
          } else {
              this.Tab_jbxx_Data_dialog.ref_text = this.jbxx_ref_text;
          }

          this.jbxx_reftext_dialogflag = false;
      },
      jbxx_reftext_cancelevent() {
          this.jbxx_reftext_dialogflag = false;
      },
      //控制参考值是否可编辑
      activeMethod({ row, column }) {
          if (column.property == "patsex") {
              if (this.tab_ckzmx_bysex_if) {
                  return true;
              } else {
                  return false;
              }
          } else if (column.property == "specimen_code") {
              if (this.tab_ckzmx_byspecimen_if) {
                  return true;
              } else {
                  return false;
              }
          } else if (column.property == "physicycle") {
              if (this.tab_ckzmx_byphysicycle_if) {
                  return true;
              } else {
                  return false;
              }
          } else if (["ageyear1", "ageyear2"].includes(column.property)) {
              if (this.tab_ckzmx_byage_if) {
                  return true;
              } else {
                  return false;
              }
          } else if (column.property == "diag_icd") {
              if (this.tab_ckzmx_bydiag_if) {
                  return true;
              } else {
                  return false;
              }
          } else if (column.property == "seq") {
              return false;
          } else {
              return true;
          }
      },
      //控制参考值颜色
      cellClassName({ row, rowIndex, column, columnIndex }) {
          if (column.property === "patsex") {
              if (!this.tab_ckzmx_bysex_if) {
                  return this.$pub.diseditcolumn();
              } else {
                  return "";
              }
          } else if (column.property == "physicycle") {
              if (!this.tab_ckzmx_byphysicycle_if) {
                  return this.$pub.diseditcolumn();
              } else {
                  return "";
              }
          } else if (column.property == "specimen_code") {
              if (!this.tab_ckzmx_byspecimen_if) {
                  return this.$pub.diseditcolumn();
              } else {
                  return "";
              }
          } else if (["ageyear1", "ageyear2"].includes(column.property)) {
              if (!this.tab_ckzmx_byage_if) {
                  return this.$pub.diseditcolumn();
              } else {
                  return "";
              }
          } else if (column.property == "diag_icd") {
              if (!this.tab_ckzmx_bydiag_if) {
                  return this.$pub.diseditcolumn();
              } else {
                  return "";
              }
          }
      },
      //控制文字结果颜色
      wzjgRowClassName({ row, column }) {
          if (["H", "P"].includes(row.result_flag)) {
              return "row-HP";
          } else if (row.result_flag == "L") {
              return "row-L";
          } else if (row.result_flag == "Q") {
              return "row-Q";
          } else if (row.result_flag == "E") {
              return "row-E";
          } else {
              //M,N
              return "";
          }
      },
      //计算公式向导开窗
      async opendialogresult(flag) {
          try {
              this.resultflag = flag;
              const res = await this.$tool.request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "getRptitemResult",
                      rpt_itemcode: this.Tab_jbxx_Data.rpt_itemcode,
                  },
              });

              this.dialogResult = true;
              this.resultData = res.data;
              let k = "";
              if (flag == "1") {
                  k = !this.Tab_jbxx_Data_dialog.result1formula ? "" : this.Tab_jbxx_Data_dialog.result1formula;
                  this.result_text = XE.clone(k, true);
              } else if (flag == "2") {
                  k = !this.Tab_jbxx_Data_dialog.result2formula ? "" : this.Tab_jbxx_Data_dialog.result2formula;
                  this.result_text = XE.clone(k, true);
              } else {
                  k = !this.Tab_jbxx_Data_dialog.result3formula ? "" : this.Tab_jbxx_Data_dialog.result3formula;
                  this.result_text = XE.clone(k, true);
              }
          } catch (e) {
              this.$alert(e, "出错");
          }
      }, //结果计算公式向导开窗
      result_iscalc_data_dbclick({ row, rowIndex, column }, event) {
          let tempstr = "";
          if (column.property == "result_str") {
              tempstr = "[@R] =" + '"' + row.result_str + '"' + " ";
          } else if (column.property == "result_num") {
              tempstr = "[R] =" + row.result_num + " ";
          }
          this.result_iscalc_addevent(tempstr);
      },
      result_iscalc_addevent(addstr) {
          if (addstr == "SEX1") {
              addstr = ' [SEX] = "1" ';
          }
          if (addstr == "SEX2") {
              addstr = ' [SEX] = "2" ';
          }
          var elInput = document.getElementById("result_calc_formula_id");
          var startPos = elInput.selectionStart;
          var endPos = elInput.selectionEnd;
          if (startPos === undefined || endPos === undefined) return;
          var txt = elInput.value;
          var result = txt.substring(0, startPos) + addstr + txt.substring(endPos);
          elInput.value = result; // 赋值给input的value
          // 重新定义光标位置
          elInput.focus();
          elInput.selectionStart = startPos + addstr.length;
          elInput.selectionEnd = startPos + addstr.length;
          this.result_text = result;
      },
      result_saveevent() {
          if (this.resultflag == "1") {
              this.Tab_jbxx_Data_dialog.result1formula = XE.clone(this.result_text, true);
          } else if (this.resultflag == "2") {
              this.Tab_jbxx_Data_dialog.result2formula = XE.clone(this.result_text, true);
          } else {
              this.Tab_jbxx_Data_dialog.result3formula = XE.clone(this.result_text, true);
          }
          this.dialogResult = false;
      }, //常用计算公式
      jbxx_iscalcGuide_show() {
          this.Lab_CalcGuideloading = true;
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "getLab_CalcGuideData",
                  },
              })
              .then((res) => {
                  // this.CalcTestKey++;
                  this.jbxx_iscalcGuide_dialog = true;
                  this.CalcTestValue = "";
                  this.Lab_CalcGuideData = res.Data;
                  setTimeout(() => {
                      this.$refs.plxTable.setCurrentRow(res.Data[0]);
                  }, 10);
                  this.Lab_CalcGuide_queryRight(res.Data[0]);
                  this.Lab_CalcGuideloading = false;
              })
              .catch((e) => {
                  this.Lab_CalcGuideloading = false;
                  this.$alert(e, "出错");
              });
      },
      //常用计算公式向导导出按钮
      ExportCalcGuide() {
          let extableColumn = [];
          let tableColumn = this.$refs.plxTable.getColumns();
          tableColumn.forEach((item) => {
              extableColumn.push({ title: item.title, field: item.property });
          });
          this.$pub.exportTableExcel(this.Lab_CalcGuideData, extableColumn, "LIS811 计算项目公式向导.xlsx");
      },
      //常用计算公式向导计算测试
      CalcTest(e) {
          let result = "";
          let lsitem = "";
          this.verifyStr = XE.clone(this.calcGuide_calcformula, true);
          let data = this.$refs.prxTable.afterFullData;
          if (data.length > 0) {
              data.forEach((item) => {
                  lsitem = item.calcformulaitem;
                  result = item.testvalue;
                  if (item.itemtype == "AA报告项目") {
                      lsitem = "*" + item.calcformulaitem + "*";
                  } else if (item.itemtype == "AGE") {
                  } else {
                      result = '"' + item.testvalue + '"';
                  }
                  lsitem = "[" + lsitem + "]";
                  this.verifyStr = this.testHaveStr(this.verifyStr, lsitem, result);
              });
              if (e.shiftKey) {
                  this.$alert(this.verifyStr, "信息");
              }
              this.$tool
                  .request({
                      url: "LIS/LIS8/LIS811",
                      method: "post",
                      data: {
                          action: "CalcTest",
                          verifyStr: this.verifyStr,
                      },
                  })
                  .then((res) => {
                      if (res.result != "" && res.result != "!" && res.result != "?") this.CalcTestValue = res.result;
                      else this.CalcTestValue = "无结果";
                  })
                  .catch((e) => {
                      this.$alert(e, "出错");
                  });
          }
      }, //replace/g方法失效，所以拓展一个函数
      testHaveStr(verifyStr, lsitem, result) {
          if (verifyStr.indexOf(lsitem) > -1) {
              this.verifyStr = verifyStr.replace(lsitem, result);
              this.testHaveStr(this.verifyStr, lsitem, result);
          } else {
              return this.verifyStr;
          }
          return this.verifyStr;
      },
      //常用计算公式向导确定
      SureCalcGuide() {
          this.verifyStr = XE.clone(this.calcGuide_calcformula, true);
          let data = this.$refs.prxTable.afterFullData;
          if (data.length > 0) {
              for (let index = 0; index < data.length; index++) {
                  const element = data[index];
                  if (element.itemtype == "AA报告项目") {
                      if (!element.rpt_itemcode) {
                          this.$alert("还没有为[" + element.calcformulaitem + "]选择对应的报告项目！", "提示");
                          return false;
                          break;
                      }
                  }
                  const tempstr = element.rpt_itemcode + "$" + element.itemcode_en;
                  if (this.jbxx_iscalc_dataLog.indexOf(tempstr) == -1) {
                      this.jbxx_iscalc_dataLog.push(tempstr);
                  }
                  this.verifyStr = this.testHaveStr(this.verifyStr, "*" + element.calcformulaitem + "*", element.rpt_itemcode);
              }
              this.jbxx_iscalcGuide_dialog = false;
              this.jbxx_s_calc_formula = XE.clone(this.verifyStr, true);
              this.jbxx_iscalc_formula_textchange();
          }
      },
      //常用计算公式向导左边列表行切换
      currentCalcGuideChangeEvent({ row }) {
          this.CalcTestValue = "";
          this.Lab_CalcGuide_queryRight(row);
      },
      //常用计算公式向导右边列表显示
      Lab_CalcGuide_queryRight(row) {
          this.Lab_CalcItemData = [];
          let data = row.calcformula;
          this.calcGuide_calcformula = XE.clone(data, true);
          const set = new Set(data.match(/\[(.+?)\]/g));
          let ArrStr = [...set];
          ArrStr.forEach((item) => {
              let tmpstr = "";
              if (item.indexOf("*") > -1) {
                  tmpstr = item.substring(2, item.length - 2);
                  this.Lab_CalcItemData.push({ calcformulaitem: tmpstr, itemtype: "AA报告项目" });
              } else {
                  tmpstr = item.substring(1, item.length - 1);
                  this.Lab_CalcItemData.push({ calcformulaitem: tmpstr, itemtype: tmpstr });
              }
          });
          this.Lab_CalcItemData.sort((a, b) => {
              return a.itemtype.localeCompare(b.itemtype, "zh-Hans-CN", { sensitivity: "accent" });
          });
      }, //常用计算公式报告项目弹窗查询
      calcGuideDblclick({ row, column }) {
          if (column.property != "testvalue") {
              if (row.calcformulaitem != "SEX" && row.calcformulaitem != "AGE") {
                  this.calcGuideRptitemRow = row;
                  this.calcguide = {};
                  this.calcGuideQueryRptitem();
              }
          }
      }, //常用计算公式报告按钮查询
      calcGuideQueryRptitem() {
          this.Lab_CalcrptItemLoading = true;
          this.dialogrptitem = true;
          this.$tool
              .request({
                  url: "LIS/LIS8/LIS811",
                  method: "post",
                  data: {
                      action: "lab_rptitem_query",
                      itemclasscode: this.calcguide.itemclasscode,
                      rptunitid: this.calcguide.rptunitid,
                      keystr: this.calcguide.txtsearch,
                  },
              })
              .then((res) => {
                  this.Lab_CalcrptItemLoading = false;
                  this.Lab_CalcrptItemData = res.RData.Data;
                  setTimeout(() => {
                      this.$refs.plxTable.setCurrentRow(res.RData.Data[0]);
                  }, 10);
              })
              .catch((e) => {
                  this.Lab_CalcrptItemLoading = true;
                  this.$alert(e, "出错");
              });
      }, //常用计算公式报告项目双击确定或按钮确定
      calcGuideSureRptitem() {
          var curRow = this.$refs.rptitemTable.getCurrentRow();
          this.calcGuideRptitemRow.rpt_itemname = curRow.rpt_itemname;
          this.calcGuideRptitemRow.rpt_itemcode = curRow.rpt_itemcode;
          this.calcGuideRptitemRow.unit = curRow.unit;
          this.calcGuideRptitemRow.ref_text = curRow.ref_text;
          this.calcGuideRptitemRow.testmethod = curRow.testmethod;
          this.calcGuideRptitemRow.itemcode_en = curRow.itemcode_en;
          this.$refs.prxTable.updateListenter();
          this.dialogrptitem = false;
      },
      //菌属标志改变
      isgermgroupChange() {
          if (this.Tab_jbxx_Data_dialog.isgermgroup) {
              this.disabledKindGroup = false;
          } else {
              this.disabledKindGroup = true;
          }
      },
      //菌科(二级分类)改变找一级分类
      germkindChange(code, name, row) {
          this.Tab_jbxx_Data_dialog.germgram = row.所属大类;
          this.Tab_jbxx_Data_dialog.germkind = code;
          this.$forceUpdate();
      },
      //菌属(三级分类)
      germgroupChange(code, name) {
          var that = this;
          that.getGermgroup(code, "kind")
              .then((res) => {
                  that.Tab_jbxx_Data_dialog.germkind = res;
                  that.getGermgroup(res, "gram")
                      .then((resp) => {
                          that.Tab_jbxx_Data_dialog.germgram = resp;
                      })
                      .catch((e) => {
                          that.$alert(e, "出错");
                      });
              })
              .catch((e) => {
                  that.$alert(e, "出错");
              });
      },
      getGermgroup(code, type) {
          let response = this.$tool.request({
              url: "LIS/LIS1/LIS110",
              method: "post",
              data: {
                  action: "getGermgroupKind",
                  code: code,
                  type: type,
              },
          });
          return response;
      },
      importRptitem() {
          this.importRptitemDialog = true;
      },
      chooseRptmodel() {
          let modelrow = this.$refs.rptmodelTable.getCurrentRow();
          if (!modelrow) return false;
          if (modelrow.value == "1") {
              //导入Excel
              let msgtext = `<div>支持从Excel中导入项目信息，如果代码已经存在会自动忽略，具体文件格式</div>
                              <div style='margin-bottom: 10px;'>如下：</div>
                              <div>1-5列：项目代码，项目名称，细菌标识，项目归类，仪器大类</div>
                              <div>6-10列：英文缩写，英文名称，结果类型，默认文字结果标志，单位</div>
                              <div>11-15列：小数位数，打印代码，参考下限，参考上限，参考范围</div>`;
              this.$confirm(msgtext, "提示", {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  dangerouslyUseHTMLString: true,
                  customClass: "import-rpt-msgbox",
                  type: "warning",
              })
                  .then(() => {
                      this.exeimportRptDialog = true;
                      this.$refs["upload"].$refs["upload-inner"].handleClick();
                  })
                  .catch(() => {});
          } else if (modelrow.value == "2") {
              //导入细菌字典
              let msgtext = "你是否要导入细菌字典？";
              this.$confirm(msgtext, "提示", {
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  type: "warning",
              })
                  .then(() => {
                      this.getMatchrptList();
                      this.exeimportMatchRptDialog = true;
                      //this.jbxx_iscalcGuide_dialog=true;
                  })
                  .catch(() => {});
          } else if (modelrow.value == "3") {
              //导入dat文件
              let msgtext = "导入将导致当前系统所有报告项目丢失，你是否要继续？";
              this.$confirm(msgtext, "提示", {
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  type: "warning",
              })
                  .then(() => {
                      this.uploadpasswordVisible = true;
                      this.uploadpassword = "";
                  })
                  .catch(() => {});
          }
      },
      getMatchrptList() {
          this.$tool
              .request({
                  url: "LIS/LIS1/LIS110",
                  method: "post",
                  data: {
                      action: "lab_rptitem_ImportMatch",
                  },
              })
              .then((res) => {
                  this.MatchrptList = res.data;
              })
              .catch((e) => {});
      },
      btnimportMatch() {
          let msgtext = `<div>导入文件为Excel文件格式，各个列应当依次为：</div>
                              <div style='margin-bottom: 10px;'>如下：</div>
                              <div>1：细菌代码</div>
                              <div>2：中文名称</div>
                              <div>3：英文名称</div>
                              <div>4：革兰氏性质Gram(+,-,f,m,a,o等取值)</div>
                              <div>5：细菌分类</div>
                              <div>6：所属菌属</div>
                              <div>7：菌属标志(1=菌属，0=细菌)</div>
                              <div>8：Whonet代码</div>
                              <div>9：项目归类</div>
                              <div>10：仪器大类</div>`;
          this.$confirm(msgtext, "提示", {
              confirmButtonText: "确定",
              showCancelButton: false,
              dangerouslyUseHTMLString: true,
              customClass: "import-rpt-msgbox",
              type: "warning",
          })
              .then(() => {
                  this.$refs["uploadmatch"].$refs["upload-inner"].handleClick();
              })
              .catch(() => {});
      },
      uploadpasswordSure() {
          //console.log(this.uploadpassword);
          if (this.uploadpassword == "导入") {
              this.uploadpasswordVisible = false;
              this.fileimportnotifyVisible = true;
              this.fileimportform.file = "";
              this.fileList = [];
              //this.percentage = 0;
          }
      },
      uploadMatchOpt(content) {
          let formData = new FormData();
          formData.append("action", "LIS110-excelmatch");
          formData.append("file", content.file);
          formData.append("CHNMatchCoverEN", this.CHNMatchCoverEN);
          formData.append("ENMatchCoverCHN", this.ENMatchCoverCHN);
          var URL = this.$tool.baseUrl.replace("api", "z") + "fileupload";
          axios
              .post(URL, formData, { "Content-Type": "multipart/form-data" })
              .then((res) => {
                  let response = res.data;
                  if (response.flag == 1) {
                      this.$notify.success({
                          title: "成功",
                          message: `文件上传成功`,
                      });
                      console.log("response", response);
                      this.importMatchrptList = XEUtils.clone(response.data, true);
                      this.tempimportMatchrptList = XEUtils.clone(response.data, true);
                      this.$refs.importMatchrptTable.loadData(this.importMatchrptList);
                      this.importNumtext = this.importMatchrptList.length;
                  } else {
                      this.$notify.error({
                          title: "错误",
                          message: response.msg,
                      });
                  }
              })
              .catch((e) => {
                  this.$alert(e, "出错");
              });
      },
      changeupdatetype() {
          if (this.importMatchrptList.length > 0) {
              this.importMatchrptList.forEach((element) => {
                  if (this.CHNMatchCoverEN == "1") {
                      if (element.presentitemname == element.importitemname && element.presentitemname_en != element.importitemname_en) {
                          element.updatetype = "更新英文名称";
                      } else {
                          element.updatetype = "忽略";
                          if (this.ENMatchCoverCHN == "1") {
                              if (element.presentitemname != element.importitemname && element.presentitemname_en == element.importitemname_en) {
                                  element.updatetype = "更新中文名称";
                              }
                          }
                      }
                  } else if (this.CHNMatchCoverEN == "0" && this.ENMatchCoverCHN == "1") {
                      if (element.presentitemname != element.importitemname && element.presentitemname_en == element.importitemname_en) {
                          element.updatetype = "更新中文名称";
                      } else {
                          element.updatetype = "忽略";
                      }
                  } else {
                      element.updatetype = "忽略";
                  }
                  if (element.presentitemname != element.importitemname && element.presentitemname_en != element.importitemname_en) {
                      element.updatetype = "新增";
                  }
              });
              this.$refs.importMatchrptTable.loadData(this.importMatchrptList);
          }
      },
      changeonlyshowupdate() {
          if (this.showonlyupdate == "1") {
              if (this.importMatchrptList.length > 0) {
                  var showonlyupdateList = this.importMatchrptList.filter((item) => item.updatetype != "忽略");
                  this.$refs.importMatchrptTable.loadData(showonlyupdateList);
                  this.importNumtext = showonlyupdateList.length;
              }
          } else {
              this.$refs.importMatchrptTable.loadData(this.importMatchrptList);
              this.importNumtext = this.importMatchrptList.length;
          }
      },
      importrptitemclassChange(code, name) {
          this.import_itemclasscode = code;
      },
      importinstrclassChange(code, name) {
          this.import_instrclass = code;
      },
      saveRptimportMatch() {
          var showonlyupdateList = this.importMatchrptList.filter((item) => item.updatetype != "忽略");

          if (showonlyupdateList.length > 0) {
              var updatenum = showonlyupdateList.length;
              this.$confirm("更新" + updatenum + "条数据", "提示", {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  dangerouslyUseHTMLString: true,
                  type: "warning",
              })
                  .then(() => {
                      this.savedata();
                  })
                  .catch(() => {});
          } else {
              this.$alert("没有要更新的数据！", "提示");
          }
      },
      savedata() {
          this.$tool
              .request({
                  url: "LIS/LIS1/LIS110",
                  method: "post",
                  data: {
                      action: "excelImportMatch",
                      data: this.importMatchrptList,
                      itemclasscode: this.import_itemclasscode,
                      instrclass: this.import_instrclass,
                  },
              })
              .then((response) => {
                  if (response.flag == "1") {
                      this.$pub.message(this, "保存成功！", "success");
                      this.clearImportMatchdata();
                      this.importRptitemDialog = false;
                  } else {
                      this.$pub.message(this, response.msg, "warning");
                  }
              })
              .catch((e) => {
                  this.$alert(e, "出错");
              });
      },
      uploadOpt(content) {
          let formData = new FormData();
          formData.append("action", "LIS110-excel");
          formData.append("file", content.file);
          var URL = this.$tool.baseUrl.replace("api", "z") + "fileupload";
          axios
              .post(URL, formData, { "Content-Type": "multipart/form-data" })
              .then((res) => {
                  let response = res.data;
                  if (response.flag == 1) {
                      this.$notify.success({
                          title: "成功",
                          message: `文件上传成功`,
                      });
                      this.fimportrptList = XEUtils.clone(response.data, true);
                      this.importrptList = XEUtils.clone(response.data, true);
                      this.$refs.importrptTable.loadData(this.importrptList);
                      this.importNumtext = response.msg;
                  } else {
                      this.$notify.error({
                          title: "错误",
                          message: response.msg,
                      });
                  }
              })
              .catch((e) => {
                  this.$alert(e, "出错");
              });
      },
      deleteRptrow() {
          let delrow = this.$refs.importrptTable.getCurrentRow();
          if (!delrow) return false;
          this.$confirm("你确定删除这笔记录?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          })
              .then(() => {
                  var delrow = this.$refs.importrptTable.getCurrentRow();
                  var rowindex = this.$refs.importrptTable.getTableData().fullData.indexOf(delrow);
                  this.importrptList.splice(rowindex, 1);
                  this.$refs.importrptTable.loadData(this.importrptList).then(() => {
                      var havedata = this.$refs.importrptTable.getTableData().fullData;
                      if (havedata.length > 0) {
                          if (rowindex >= havedata.length) rowindex = havedata.length - 1;
                          // this.fbactPurposeList = XEUtils.clone(havedata, true);
                          let selectrow = havedata[rowindex];
                          this.$refs.importrptTable.setCurrentRow(selectrow);
                      }
                  });
              })
              .catch(() => {});
      },
      saveRptimport() {
          this.$tool
              .request({
                  url: "LIS/LIS1/LIS110",
                  method: "post",
                  data: {
                      action: "excelImport",
                      data: this.importrptList,
                  },
              })
              .then((response) => {
                  if (response.flag == "1") {
                      this.$pub.message(this, "保存成功！", "success");
                      this.exeimportRptDialog = false;
                      this.importRptitemDialog = false;
                  } else {
                      this.$pub.message(this, response.msg, "warning");
                  }
              })
              .catch((e) => {
                  this.$alert(e, "出错");
              });
      },
      cancelDatachange() {
          this.$confirm("你确定要取消这次改动?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          })
              .then(() => {
                  this.importrptList = XEUtils.clone(this.fimportrptList, true);
                  this.$refs.importrptTable.loadData(this.importrptList);
              })
              .catch(() => {});
      },
      clearImportdata() {
          // this.$refs.importrptTable.loadData();
          this.exeimportRptDialog = false;
          this.fimportrptList = [];
          this.importrptList = [];
          this.importNumtext = "";
      },
      clearImportMatchdata() {
          this.exeimportMatchRptDialog = false;
          this.importMatchrptList = [];
          this.importNumtext = "";
          this.CHNMatchCoverEN = "1";
          this.ENMatchCoverCHN = "1";
      },
      // 文件状态改变时的钩子
      fileChange(file, fileList) {
          this.form.file = file.raw;
      },
      // 文件超出个数限制时的钩子
      exceedFile(files, fileList) {
          this.$notify.warning({
              title: "警告",
              message: `只能选择 ${this.limitNum} 个文件，当前共选择了 ${files.length + fileList.length} 个`,
          });
      },
      // 文件状态改变时的钩子
      fileimportChange(file, fileList) {
          this.fileimportform.file = file.raw;
      },
      // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject，则停止上传
      beforeUploadFile(file) {
          let extension = file.name.substring(file.name.lastIndexOf(".") + 1);
          let size = file.size / 1024 / 1024;
          if (extension !== "dat") {
              this.$notify.warning({
                  title: "警告",
                  message: `只能上传DAT(*dat)文件，且不超过10M`,
              });
          }
          if (size > 10) {
              this.$notify.warning({
                  title: "警告",
                  message: `文件大小不得超过10M`,
              });
          }
      },
      uploadFile() {
          if (this.fileimportform.file) {
              this.MainTableData = [];
              const loading = this.$loading({
                  // 声明一个loading对象
                  lock: true, // 是否锁屏
                  text: "正在导入报告项目，请稍候……", // 加载动画的文字
                  spinner: "el-icon-loading", // 引入的loading图标
                  background: "rgba(0, 0, 0, 0.3)", // 背景颜色
                  target: ".sub-main", // 需要遮罩的区域
                  body: true,
                  customClass: "mask", // 遮罩层新增类名
              });
              var URL = this.$tool.baseUrl.replace("api", "z") + "fileupload";
              let formData = new FormData();
              formData.append("file", this.fileimportform.file);
              formData.append("action", "LIS110-dat");
              formData.append("isoverrideall", this.isoverride);
              axios
                  .post(URL, formData, { "Content-Type": "multipart/form-data" })
                  .then((res) => {
                      loading.close();
                      if (res.status == 200) {
                          let response = res.data;
                          if (response.flag == "1") {
                              this.$notify.success({
                                  title: "成功",
                                  message: `文件上传成功`,
                              });
                              this.fileimportnotifyVisible = false;
                          } else {
                              this.$notify.error({
                                  title: "错误",
                                  message: `文件上传失败`,
                              });
                              this.fileimportnotifyVisible = true;
                          }
                      } else {
                          this.$notify.error({
                              title: "错误",
                              message: `文件上传失败`,
                          });
                          this.fileimportnotifyVisible = true;
                      }
                      this.MainTable_Rfresh();
                  })
                  .catch((e) => {
                      console.log("error", e);
                  });
          } else {
              this.$alert("请先选择文件再上传！");
          }
      },
  },
};
</script>

<style scoped>
/deep/.el-checkbox__inner::after {
  border: 2px solid #000000 !important;
  box-sizing: content-box;
  content: "";
  border-left: 0 !important;
  border-top: 0 !important;
  height: 7px;
  left: 4px;
  position: absolute;
  top: 1px;
  transform: rotate(45deg) scaleY(0);
  width: 3px;
  transition: transform 0.15s ease-in 0.05s;
  transform-origin: center;
}
/deep/.el-checkbox__input.is-disabled + span.el-checkbox__label {
  color: #000000;
  cursor: not-allowed;
}
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner,
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner + .el-input.is-disabled .el-input__inner {
  background-color: #ffffff !important;
}
/deep/ .mystyle tr.vxe-body--row.row-new {
  color: #cc6600;
}
/deep/ .mystyle tr.vxe-body--row.row-modify {
  color: blue !important;
}

/deep/ .wzjgstyle .vxe-body--row.row-HP {
  background-color: RGB(255, 192, 192);
}
/deep/ .wzjgstyle .vxe-body--row.row-E {
  background-color: RGB(219, 112, 147);
}
/deep/ .wzjgstyle .vxe-body--row.row-L {
  background-color: RGB(192, 192, 255);
}
/deep/ .wzjgstyle .vxe-body--row.row-Q {
  background-color: RGB(255, 255, 192);
}
.pagetop {
  left: 0;
  right: 0;
  height: 100px;
  display: -webkit-box;
  -webkit-box-pack: center;
  -webkit-box-align: center;
  border: solid 1px #ccc;
  position: absolute;
  z-index: 99;
}
.pagecenter {
  position: absolute;
  top: 105px;
  width: 100%;
  left: 0;
  bottom: 0px;
  overflow: auto;
}
.middle-center {
  position: absolute;
  height: 100%;
  right: 805px;
  left: 0;
  overflow: auto;
}
.middle-right {
  position: absolute;
  top: 0;
  bottom: 0px;
  overflow: visible;
  width: 800px;
  right: 0px;
}
table tr td:nth-child(odd) {
  text-align: right;
  white-space: nowrap;
}
table tr td:nth-child(even) {
  text-align: left;
}
table tr td:nth-child(1) {
  width: 80px;
}
table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 5px;
}
.upload-demo {
  margin-left: 8px;
  margin-right: 8px;
}

.scroll_title {
  text-align: left;
  height: 500px;
  width: 100%;
  overflow: auto;
}
.importrpt-model {
  display: flex;
  justify-content: space-between;
  height: 250px;
}
.importrpt-modelbtn {
  margin: auto;
}
.importrpt-modelbtn div {
  margin: 20px 0;
}
.upload-button {
  height: 24px;
  margin: 0 10px;
  display: none;
}
.upload-button div {
  height: 24px;
}
/deep/ .upload-button .el-upload--text {
  border: 0 !important;
  border-radius: 3px !important;
}
/deep/.mytablestyle tr td div .el-input__inner {
  border: 1px solid rgba(255, 254, 254, 0) !important;
  background-color: rgba(255, 254, 254, 0) !important;
}
</style>